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 2
2
title : Security
3
3
order : 400
4
4
---
5
+
5
6
# Security
6
7
7
8
When 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
72
73
73
74
#### Prevent regular browser access
74
75
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.
79
77
80
78
This ensures that only requests coming from the web view shell that booted your application can make requests into your
81
79
application.
82
80
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
-
96
81
## Protecting your users and their data
97
82
98
83
Equally 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