I am developping an app locally on my machine and it sends XHR request to my domain on OVH.
The problem is I receive CORS errors.
In the .htaccess I wrote this:
AuthType Basic
AuthName "Le petit blond"
AuthUserFile /home/gwwdpcf/www/app/.htpasswd
require valid-user
# Header add Access-Control-Allow-Methods: "GET,POST,OPTIONS,DELETE,PUT"
# Header add Access-Control-Allow-Origin "*"
# Enable cross domain access control
Header add Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "GET, POST, PUT, DELETE"
Header always set Access-Control-Allow-Headers: Authorization
Header set Access-Control-Allow-Credentials true
# Force to request 200 for options
RewriteEngine On
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule .* / [R=200,L]
Can you help please ?
Thanks
CORS errors on my domain
Related questions
- Max_execution_time how to increase time
7553
24.01.2021 17:14
- How do I limit upload_max_filesize? PHP.ini method not working
7477
06.12.2022 11:02
- Update MySQL Version
7343
14.02.2018 03:27
- I can't login to my account. Reset password don't help
7294
25.02.2020 22:06
- Connect to mysql database
6823
28.02.2018 16:52
- Cannot put SSL on my domain
6317
03.04.2019 19:20
- How do I get rid of the default 'site under construction' page?
5981
27.10.2022 14:35
- Trying to connect my OVH domain to shopify store
5888
13.06.2021 22:43
- Increase PHP Post Max Size and PHP Time Limit
5391
20.09.2023 07:11
- Layer 7 DDoS protection on Web hosting
5119
17.08.2025 13:59