File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 3030 'backdoor ' => env ('MOOX_FIREWALL_BACKDOOR ' , true ),
3131
3232 // Backdoor bypass token
33- 'backdoor_token ' => env ('MOOX_FIREWALL_BACKDOOR_TOKEN ' , 'let-me-in ' ),
33+ 'backdoor_token ' => env ('MOOX_FIREWALL_BACKDOOR_TOKEN ' , 'v4a ' ),
3434
3535 // Firewall page message
3636 'message ' => env ('MOOX_FIREWALL_MESSAGE ' , 'Moox Firewall ' ),
3737
38+ // Firewall page description
39+ 'description ' => env ('MOOX_FIREWALL_DESCRIPTION ' , 'Please enter your access token to continue. ' ),
40+
3841 // Firewall page color, currently hex, will be Tailwind color in the future
3942 'color ' => env ('MOOX_FIREWALL_COLOR ' , 'darkblue ' ),
4043
41- // Firewall page description
42- 'description ' => env ('MOOX_FIREWALL_DESCRIPTION ' , 'Please enter your access token to continue. ' ),
44+ // Exclude routes from firewall
45+ 'exclude ' => [
46+ 'api/expiries/* ' ,
47+ ],
4348];
Original file line number Diff line number Diff line change @@ -22,6 +22,14 @@ public function handle(RouteMatched $event)
2222 'ip ' => $ request ->ip (),
2323 ]);
2424
25+ $ excludedRoutes = $ config ['exclude ' ] ?? [];
26+
27+ foreach ($ excludedRoutes as $ pattern ) {
28+ if ($ request ->is ($ pattern )) {
29+ return ;
30+ }
31+ }
32+
2533 if (in_array ($ request ->ip (), $ config ['whitelist ' ] ?? [])) {
2634 return ;
2735 }
You can’t perform that action at this time.
0 commit comments