Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: Send Content-Type as api response header too #8108

Merged
merged 1 commit into from Nov 3, 2020

Conversation

yhabteab
Copy link
Member

resolves #6747

@yhabteab yhabteab requested a review from Al2Klimov July 10, 2020 08:46
Copy link
Member

@Al2Klimov Al2Klimov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write a test protocol.

@yhabteab
Copy link
Member Author

Testprotocol:
# curl -i -X OPTIONS -H 'Origin: https://localhost' -H 'Accept: application/json' -H 'Access-Control-Request-Headers: authorization,content-type,x-http-method-override' -H 'Access-Control-Request-Method: POST' -k -u 'root:icinga' 'https://localhost:5665/v1/objects/services'

Before:

HTTP/1.1 200 OK
Server: Icinga/v2.12.0-rc1-52-g04704a49a
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE
Access-Control-Allow-Headers: Authorization, X-HTTP-Method-Override
Content-Length: 12
Connection: close

Preflight OK

After:

HTTP/1.1 200 OK
Server: Icinga/v2.12.0-rc1-52-g04704a49a
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, PUT, DELETE
Access-Control-Allow-Headers: Authorization, Content-Type, X-HTTP-Method-Override
Content-Length: 12
Connection: close

Preflight OK

@yhabteab yhabteab requested a review from Al2Klimov July 10, 2020 08:57
@Al2Klimov Al2Klimov added this to the 2.13.0 milestone Jul 10, 2020
@Al2Klimov Al2Klimov added this to To review in v2.13.0 merge window via automation Jul 10, 2020
@Al2Klimov Al2Klimov added area/api REST API bug Something isn't working labels Jul 10, 2020
v2.13.0 merge window automation moved this from To review to Approved Nov 3, 2020
@Al2Klimov Al2Klimov merged commit 1450e1b into master Nov 3, 2020
v2.13.0 merge window automation moved this from Approved to Merged Nov 3, 2020
@icinga-probot icinga-probot bot deleted the bugfix/api-incorrect-response-header-6747 branch November 3, 2020 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api REST API bug Something isn't working
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

CORS: incorrect headers in response to OPTIONS request
3 participants