File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 156
156
$ router ->map ('GET ' , '/{page:(?:.|/)*} ' , HttpToHttpsController::class)->setScheme ('http ' );
157
157
}
158
158
159
+ /*/ To prevent "405 Method Not Allowed" from the Router we only map `/*` to
160
+ * OPTIONS when OPTIONS are actually requested.
161
+ /*/
162
+ if ($ request ->getMethod () === 'OPTIONS ' ) {
163
+ $ router ->map ('OPTIONS ' , '/{path:.*} ' , CorsController::class);
164
+ }
165
+
159
166
$ router ->map ('GET ' , '/ ' , HelloWorldController::class);
160
167
161
168
// @FIXME: CORS handling, slash-adding (and possibly others?) should be added as middleware instead of "catchall" URLs map
171
178
172
179
$ router ->map ('GET ' , '/login ' , AddSlashToPathController::class);
173
180
$ router ->map ('GET ' , '/profile ' , AddSlashToPathController::class);
174
-
175
- $ router ->map ('OPTIONS ' , '/{path:.*} ' , CorsController::class);
176
181
$ router ->map ('GET ' , '/.well-known/openid-configuration ' , OpenidController::class);
177
182
$ router ->map ('GET ' , '/jwks ' , JwksController::class);
178
183
$ router ->map ('GET ' , '/login/ ' , LoginPageController::class);
You can’t perform that action at this time.
0 commit comments