Closed BoKKeR closed 5 years ago
I have used cloud flare to point my domain to my servers IP address. After this I got an SSL certificate using letsEncrypt. I updated the domain to https in the .env file. but now I am getting CORS errors. Is this a nginx issue?
Access to XMLHttpRequest at 'https://myurl/api/guest/feed?sort=hot&page=1&filter=subscribed&exclude_liked_submissions=0&include_nsfw_submissions=0&exclude_bookmarked_submissions=0&submissions_type=All&all_tags=0' from origin 'https://myurl' has been blocked by CORS policy: Request header field X-Socket-Id is not allowed by Access-Control-Allow-Headers in preflight response.
https://i.imgur.com/m8JJs4d.png Thanks for any help
Fixed by including:
composer require barryvdh/laravel-cors
I have used cloud flare to point my domain to my servers IP address. After this I got an SSL certificate using letsEncrypt. I updated the domain to https in the .env file. but now I am getting CORS errors. Is this a nginx issue?
Access to XMLHttpRequest at 'https://myurl/api/guest/feed?sort=hot&page=1&filter=subscribed&exclude_liked_submissions=0&include_nsfw_submissions=0&exclude_bookmarked_submissions=0&submissions_type=All&all_tags=0' from origin 'https://myurl' has been blocked by CORS policy: Request header field X-Socket-Id is not allowed by Access-Control-Allow-Headers in preflight response.
https://i.imgur.com/m8JJs4d.png Thanks for any help