For some reason, on OVH my Laravel projects not working… and the code is actually pretty simple, just this route:
$content = “test”;
$headers = [
‘Content-type’ => ‘text/plain’,
‘Content-Disposition’ => sprintf(‘attachment; filename="%s"’, “test.txt”),
‘Content-Length’ => strlen($content)
return \Illuminate\Support\Facades\Response::make($content, 200, $headers);
Then, if I use wget to download this file, I get this:
–2021-11-02 20:26:14-- https:// mywebsite. me/test
Risoluzione di mywebsite. me (mywebsite. me)… 220.127.116.11
Connessione a mywebsite. me (mywebsite. me)|18.104.22.168|:443… connesso.
Richiesta HTTP inviata, in attesa di risposta… 403 Forbidden
2021-11-02 20:26:14 ERRORE 403: Forbidden.
If I add a Log::info(“test”) in my web.php the log is empty…
This makes me think that, first of all, is not laravel returning 403, and therefore the server is completely ignoring the .htaccess and going “manually” checking if the file exists, and since there is not that file called test.txt, is returning 403
Are you aware of something like this? How can I solve this?