File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed
resources/views/docs/desktop/1/digging-deeper Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change 22title : Security
33order : 400
44---
5+
56# Security
67
78When building desktop applications it's essential to take your application's security to the next level, both to
@@ -72,27 +73,11 @@ but you should do all you can to prevent unwanted attack vectors from being made
7273
7374#### Prevent regular browser access
7475
75- When you're ready, you should add the ` PreventRegularBrowserAccess ` middleware to your application's global middleware
76- stack, ** especially before building your application for production release** .
77-
78- ** This is NOT done for you.**
76+ When you are running a build, the global ` PreventRegularBrowserAccess ` middleware will be applied to all your routes automatically.
7977
8078This ensures that only requests coming from the web view shell that booted your application can make requests into your
8179application.
8280
83- Append the middleware in your ` bootstrap/app.php ` file:
84-
85- ``` php
86- use Native\Laravel\Http\Middleware\PreventRegularBrowserAccess;
87-
88- return Application::configure(basePath: dirname(__DIR__))
89- // ...
90- ->withMiddleware(function (Middleware $middleware) {
91- $middleware->append(PreventRegularBrowserAccess::class);
92- })
93- // ...
94- ```
95-
9681## Protecting your users and their data
9782
9883Equally important is how your app protects users. NativePHP is a complex combination of powerful software and so there
You can’t perform that action at this time.
0 commit comments