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
Web Hosting - CORS errors on my domain
Related questions
- How do I limit upload_max_filesize? PHP.ini method not working
9842
06.12.2022 11:02
- Update MySQL Version
9825
14.02.2018 03:27
- Max_execution_time how to increase time
9686
24.01.2021 17:14
- Connect to mysql database
9680
28.02.2018 16:52
- I can't login to my account. Reset password don't help
9392
25.02.2020 22:06
- Cannot put SSL on my domain
8702
03.04.2019 19:20
- Layer 7 DDoS protection on Web hosting
8444
17.08.2025 13:59
- How do I get rid of the default 'site under construction' page?
7979
27.10.2022 14:35
- Trying to connect my OVH domain to shopify store
7813
13.06.2021 22:43
- Abuse Report not working
7350
27.03.2025 07:45