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
- Update MySQL Version
12440
14.02.2018 03:27
- How do I limit upload_max_filesize? PHP.ini method not working
12136
06.12.2022 11:02
- Max_execution_time how to increase time
12053
24.01.2021 17:14
- Connect to mysql database
11889
28.02.2018 16:52
- I can't login to my account. Reset password don't help
11430
25.02.2020 22:06
- Layer 7 DDoS protection on Web hosting
10920
17.08.2025 13:59
- Cannot put SSL on my domain
10890
03.04.2019 19:20
- Abuse Report not working
10261
27.03.2025 07:45
- How do I get rid of the default 'site under construction' page?
9952
27.10.2022 14:35
- Trying to connect my OVH domain to shopify store
9137
13.06.2021 22:43