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

Incorrect CORS code fragment in Spring Framework Documentation [SPR-17167] #21703

Closed
spring-issuemaster opened this issue Aug 11, 2018 · 1 comment
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Aug 11, 2018

Sviatoslav Hryb opened SPR-17167 and commented

Section Web on Servlet Stack, paragraph 1.7.5. CORS Filter and section Web on Servlet Stack, paragraph 1.7.5. CORS WebFilter contain snippet of code with incorrect statements.
The incorrect statements are:

  • config.addAllowedHeader(""); 
  • config.addAllowedMethod("");

These statements have no sense. There may be a problem with HTML. According to Spring Framework Reference Documentation 4.3.9 I think there should be following statements:

  • config.addAllowedHeader("*"); 
  • config.addAllowedMethod("*");

Affects: 5.0.8

Reference URL: https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html#mvc-cors

Attachments:

Referenced from: commits 8d08935, 6ed03c2

@spring-issuemaster
Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Aug 11, 2018

Juergen Hoeller commented

This is encoded the right way in the 4.3.18 docs, so it's probably a side effect of some different asciidoctor declaration in 5.0.x...

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.