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

Change CORS Access Control headers in proxy server #360

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

rpoet-jh
Copy link
Contributor

@rpoet-jh rpoet-jh commented Dec 5, 2023

The Access-Control-Allow-Origin header was set to * allowing any domain to make a CORS request. I have changed this so that the Access-Control-Allow-Origin will be set to https://domainname.

I also removed the access control headers since allowing the browser to default is recommended. Additionally, I didn't see any requests where a header named authorization was being returned, so the Access-Control-Expose-Headers appeared to be not relevant to PASS.

I tested these changes locally and on stage, and logging into pass worked fine.

@rpoet-jh rpoet-jh requested a review from markpatton December 5, 2023 22:19
@rpoet-jh rpoet-jh self-assigned this Dec 5, 2023
Copy link
Contributor

@markpatton markpatton left a comment

Choose a reason for hiding this comment

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

Looks good. I was wondering about pass-data-client, but CORS should not apply to those requests because they won't have an origin header set.

@rpoet-jh
Copy link
Contributor Author

Looks good. I was wondering about pass-data-client, but CORS should not apply to those requests because they won't have an origin header set.

Right, the deposit/notification services and data loaders that use pass-data-client actually communicate directly with pass-core:8080 bypassing the proxy/auth containers. CORS enforcement is mainly a function of the browser, so this seem ok.

@rpoet-jh rpoet-jh merged commit 4582d50 into main Dec 12, 2023
2 checks passed
@rpoet-jh rpoet-jh deleted the russ-833-cross-domain-fix branch August 1, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Security - med] Cross-Domain Misconfiguration zap alert
2 participants