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

Cors fix #45

Merged
merged 3 commits into from
Aug 7, 2019
Merged

Cors fix #45

merged 3 commits into from
Aug 7, 2019

Conversation

patrick-werner
Copy link
Member

Using cors.allowed.origin=* together with credentials is forbidden:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Server-Side_Access_Control
https://www.w3.org/TR/cors/

and results in a 403 response.
This PR adds support for allowCredentials, and a list of allowed origins.
The spring CORS filter will check if the origin is in this list an returns the appropriate url.

Copy link
Contributor

@jamesagnew jamesagnew left a comment

Choose a reason for hiding this comment

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

Looks great- One change requested, feel free to merge after that!

src/main/java/ca/uhn/fhir/jpa/starter/HapiProperties.java Outdated Show resolved Hide resolved
@patrick-werner
Copy link
Member Author

@jamesagnew would love to merge, but i still don't have contributor rights on this repo.

@jamesagnew
Copy link
Contributor

@patrick-werner - Can you check the email account you have registered with GitHub? You should see an invite.

@patrick-werner
Copy link
Member Author

patrick-werner commented Aug 7, 2019

@jamesagnew
i got the invite, i have a member status in the orga, but i don't have rights within this project.

@jamesagnew
Copy link
Contributor

Can you try again? I'm still learning how permissions work in GitHub after all these years apparently :p

@patrick-werner patrick-werner merged commit 38c711d into hapifhir:master Aug 7, 2019
@patrick-werner
Copy link
Member Author

it worked. Thanks @jamesagnew

@patrick-werner patrick-werner deleted the cors-fix branch August 7, 2019 15:57
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.

None yet

2 participants