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 global configuration support in XML namespace [SPR-13046] #17638

Closed
spring-issuemaster opened this issue May 19, 2015 · 1 comment
Closed

CORS global configuration support in XML namespace [SPR-13046] #17638

spring-issuemaster opened this issue May 19, 2015 · 1 comment
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented May 19, 2015

Sébastien Deleuze opened SPR-13046 and commented


Issue Links:

  • #17526 Add global CORS configuration capabilities

Referenced from: commits 0c3b34f, e5f76af

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Jun 3, 2015

Sébastien Deleuze commented

It is now possible to configure CORS thanks to the XML mvc namespace:

<mvc:cors>
     <mvc:mapping path="/api/**"
                        allowed-origins="http://domain1.com, http://domain2.com"
                        allowed-methods="GET, PUT"
                        allowed-headers="header1, header2, header3"
                        exposed-headers="header1, header2" allow-credentials="false"
                        max-age="123" />
     <mvc:mapping path="/resources/**" allowed-origins="http://domain1.com" />
</mvc:cors>

This minimal configuration handle CORS request on /** path pattern:

<mvc:cors />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.