I'm trying to call the REST API in ajax from another application. In this call, I do a POST request to submit a workspace. The call works fine in Postman and I get a job id in return.
However in the response headers, I only get the following parameters: Content-Length, Content-Type and Date. For the purpose of my application, I also need the Access-Control-Allow-Origin in the response headers.
Any idea how I can make that happen?
version used: FME server 19.1 over https (port 8443)
Thanks in advance
Best answer by pascalatsafe
FME Server will only return the Access-Control-Allow-Origin header and other Access-Control-* (CORS) header if an Origin header was present in the request. When performing Ajax requests using Javascript, the browser will include that header by default, but Postman does not. It is possible to set a value in Postman if you are testing CORS.
FME Server will only return the Access-Control-Allow-Origin header and other Access-Control-* (CORS) header if an Origin header was present in the request. When performing Ajax requests using Javascript, the browser will include that header by default, but Postman does not. It is possible to set a value in Postman if you are testing CORS.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.