Newbies kietnt Posted May 11, 2022 Newbies Share Posted May 11, 2022 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...
coolcat Posted April 3, 2023 Share Posted April 3, 2023 I am curios about this also Link to comment Share on other sites More sharing options...
Josh Ormond Posted April 6, 2023 Share Posted April 6, 2023 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. Link to comment Share on other sites More sharing options...
coolcat Posted September 10, 2023 Share Posted September 10, 2023 (edited) 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, 2023 by coolcat 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