Forum

Preflight CORS Request

Eric
13 January 2014, 17:22


Hiawatha version: 9.1
Operating System: linux (embedded)

Hi Hugo,
I plan to provide a WebApi, which should also be available in cross-domain scenarios. (CORS)
Because I have to transfer credentials in that scenario, I do not have a 'simple request' anymore and therefore I have to support a response to the OPTIONS Preflight Request. :-(

Is there a way for supporting CORS scenarios in Hiawatha, or do I have a chance to ge this running somehow?
I saw that the OPTIONS method is removed, and now I think I'm stuck with that problem. (No OPTIONS -> no CORS) :-(

I hope you can help solving this issue...

Best,
Eric
Hugo Leisink
13 January 2014, 20:34
Is you set 'WebDAVapp = yes', Hiawatha will not only accept requests methods like GET and POST, but also methods like OPTIONS. In a CGI script, you can check for the request method (REQUEST_METHOD environment setting) to handle the OPIONS request.
This topic has been closed.