You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was creating a small ui for nomad to allow me to see the status of jobs in a webbased format.
When using jQuery I stumbled on the fact that nomad doesnt set the Access-Control-Allow-Origin header. This results in browser messages like: XMLHttpRequest cannot load http://10.0.50.11:4646/v1/jobs?pretty&_=1453414011020. Response for preflight has invalid HTTP status code 405
index.html:70 ajax error 0
I would probably be able to fix this with using a reverse proxy, but I would like to configure a setting to enable setting the header Access-Control-Allow-Origin: *
The text was updated successfully, but these errors were encountered:
I suggest to also add support for Access-Control-Request-Method and Access-Control-Request-Headers too.
A temporary hack could be just relaying the requested values in the Access-Control-Allow-Methods and Access-Control-Allow-Headers response.
@MansM@KenVanHoeylandt You should be able to configure the API servers to set arbitrary headers via the agent configuration with this PR. Hoping that would work for you?
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
I was creating a small ui for nomad to allow me to see the status of jobs in a webbased format.
When using jQuery I stumbled on the fact that nomad doesnt set the Access-Control-Allow-Origin header. This results in browser messages like: XMLHttpRequest cannot load http://10.0.50.11:4646/v1/jobs?pretty&_=1453414011020. Response for preflight has invalid HTTP status code 405
index.html:70 ajax error 0
I would probably be able to fix this with using a reverse proxy, but I would like to configure a setting to enable setting the header Access-Control-Allow-Origin: *
The text was updated successfully, but these errors were encountered: