Jump to content

This topic is 530 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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]

 

  • 10 months later...
Posted

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.

  • 5 months later...
Posted (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 by coolcat

This topic is 530 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.