May 11, 20223 yr Newbies 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]
April 6, 20232 yr What are you trying to do? There are ways to avoid the CORS issues, but they often depend on using a different method. The suggestion will depend on what your are actually trying to do that you are running into CORS issues.
September 10, 20232 yr I am curious about this too. I want to send requests from a web page to FMS but get the same server cors error... i tried adding to request - mode: 'no-cors' but still errors var requestOptions = { method: 'POST', mode: 'no-cors', headers: myHeaders, body: raw, redirect: 'follow' }; Edited September 10, 20232 yr by coolcat
Create an account or sign in to comment