Newbies kietnt Posted May 11 Newbies Share Posted May 11 Hi, I tried some solutions by adding the lines below to the httpd.conf <Location “/fmi”> the lines as below </Location>. But It could not accept the connection from my pc to the server. Please help me Thanks Error message: Access to XMLHttpRequest at 'example.com' from origin 'http://localhost:9000' has been blocked by CORS policy: Request header field access-control-allow-headers is not allowed by Access-Control-Allow-Headers in preflight response. Header always set Access-Control-Allow-Origin "*" Header always set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Access-Control-Allow-Origin, Authorization" Header always set Access-Control-Allow-Methods "PATCH, GET, POST, DELETE, OPTIONS" RewriteEngine On RewriteCond %{REQUEST_METHOD} OPTIONS RewriteRule ^(.*)$ $1 [R=200,L] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now