Add support for OPTIONS request to HttpTransport #3234
This PR adds support for the
Motivation and Context
If web applications want to log messages to Graylog, the user's web browser will send preflight requests to the GELF HTTP input. If these preflight requests fail, the web browser will refuse to send anything to that URI.
Types of changes
bernd left a comment •
While this fixes the 405 response, I am getting the following error when testing it from the browser with a correct Content-Type header.
It works when I add the
If the allowed headers setting is mandatory for CORS, we should probably make it configurable for the user.
This is my test script: https://gist.github.com/bernd/a302402349bf8daaf88a98d5c1b5f5d1
I disagree here. We should allow the absolute minimum of required headers (which seem to be
We can still make the list of allowed headers configurable in a specific feature request.