Jump to content

How to enable Cors for Filemaker Server 19.4.2 API ?


Recommended Posts

  • 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]

 

Link to comment
Share on other sites

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
 Share

×
×
  • Create New...

Important Information

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