Frederic Houle
Frederic Houle
Thanks for your contribution shankuandyou!
Try this one ``` Flight::route('*',function(){ $request = Flight::request(); if($request->url != '') { if(substr($request->url,-1) == '/' && strlen($request->url) > 1) { $url = rtrim($request->url,'/'); Flight::redirect($url,301); } } return true; }); ```
Since I may move my applications around a lot, I prefer to keep everything in the PHP code instead of webserver configuration files. That way, when you move something around...
You are right on that point. I guess a small checkup of the request_uri before loading the framework would be better in term of performance than doing it in the...
I have the exact same problem. Did you find a workaround @KTibow ?
Thanks, just did the same. Works flawlessly.
Maybe we can take into count `stale-if-error` from `Cache-Status` - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
Should this issue be moved to https://github.com/darkweak/souin ?
> In that case, you could just do this: > > ```js > event.setHeaders({ > "my-header": ["first value", "second value"].join(', ') > }); > ``` > > We _could_ add...
For reference, a working key contains this: ``` HTTP/0.0 200 OK Cache-Control: public, max-age=86400, must-revalidate Content-Encoding: gzip Content-Type: text/html; charset=UTF-8 Date: Fri, 21 Apr 2023 18:58:53 GMT Server: Caddy Server:...