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

OPSEXP-1415: Update ingress annotations for front end apps #89

Merged
merged 1 commit into from
Apr 21, 2022

Conversation

EquinoxBlack
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commented Apr 20, 2022

CLA assistant check
All committers have signed the CLA.

@EquinoxBlack EquinoxBlack requested a review from mteodori April 20, 2022 16:09
@EquinoxBlack EquinoxBlack force-pushed the opsexp-1415 branch 2 times, most recently from 2eb1189 to 9c104a9 Compare April 20, 2022 16:21
@EquinoxBlack EquinoxBlack requested a review from a team April 20, 2022 16:29
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/cors-allow-headers: Authorization, Content-Type, Accept
Copy link
Member

Choose a reason for hiding this comment

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

is this line really needed?

as per docs, Authorization and Content-Type are already in the defaults, while Accept is allowed by specs

Copy link

Choose a reason for hiding this comment

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

spec doesn't loook that affirmative about Accept header. Looks to me it can depend on actual field value too https://fetch.spec.whatwg.org/#cors-safelisted-request-header

@EquinoxBlack do we know what the value of the accept field can be?

Copy link
Contributor Author

@EquinoxBlack EquinoxBlack Apr 21, 2022

Choose a reason for hiding this comment

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

Copy link

Choose a reason for hiding this comment

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

then do you mind trying without setting the cors-allow-headers annotation? Just to make sure we're not allowing dodgy requests by-passing the additional restriction the spec enforces?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, right now trying to test without it. Will get back here when finished

Copy link
Member

@gionn gionn Apr 21, 2022

Choose a reason for hiding this comment

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

Looks to me it can depend on actual field value too https://fetch.spec.whatwg.org/#cors-safelisted-request-header

didn't notice that before (it was present also on mozilla.org page), however it's more oriented to avoid that invalid values for that field return an affirmative cors response, I think it will be fine removing cors-allow-headers directive

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alxgomz all passed without 'cors-allow-headers' annotation. Updated pr

Copy link

@alxgomz alxgomz left a comment

Choose a reason for hiding this comment

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

LGTM

@EquinoxBlack EquinoxBlack merged commit bd76c66 into develop Apr 21, 2022
@EquinoxBlack EquinoxBlack deleted the opsexp-1415 branch April 21, 2022 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants