Laravel 8 application Referrer Policy: strict-origin-when-cross-origin

  laravel, php

The application works properly,, 2 days ago I am trying to run the application but faced the following error

Request URL:
Request Method: POST
Status Code: 302 Found
Remote Address:
Referrer Policy: strict-origin-when-cross-origin

I cant login the server redirect me to the login page again,,
the solation that i tried:

  1. install the fruitcake/laravel-cors package -> no solution!!!

  2. create cros middleware and handle the Access-Control -> no

  3. Insert this code in the bootstrapapp.php file:

    header(‘Access-Control-Allow-Origin’, ‘*’);
    header(‘Access-Control-Allow-Methods’, ‘GET, POST, PUT, PATCH, DELETE, OPTIONS’);
    header(‘Access-Control-Allow-Headers’, ‘Content-Type, Authorization’);
    without results!!

  4. insert this code in the .htaccess file:

    Header always set Access-Control-Allow-Origin "*"
    Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
    Header always set Access-Control-Max-Age "1000"
    Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"

    RewriteEngine On
    RewriteRule ^(.*)$ $1 [R=200,L]

i still have the the same results only redirecting back to the same login page..
any help please?

Source: Laravel

Leave a Reply