-
Notifications
You must be signed in to change notification settings - Fork 563
@Crossorigin Put Requests to association resources not working anymore [DATAREST-1581] #1940
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
Comments
Greg Turnquist commented Spring Framework 5.3 restricts default allowed methods to GET, HEAD, and POST. This means that PUT, PATCH, and any other methods previously supported must be deliberately activated. You can see these changes applied in a957699 |
Greg Turnquist commented If you need to alter Cross Origin settings in your Spring Data REST application, CorsIntegrationTests provides the perfect example:
This example tweaks the allowed methods to include PUT and sets what origins are allowed, all mapped to the relevant path |
Phil Webb commented Did you see the note about the Javadoc? spring-projects/spring-boot#22957 (comment)
Does it need to be updated? |
Greg Turnquist commented If so, sounds like a Spring Framework issue. We do nothing custom but instead invoke Spring Web's CorsConfiguration.applyPermitDefaultValues |
Oliver Drotbohm commented But shouldn't we assume different defaults given the fact that we know we want to support these additional HTTP methods on resources we expose? |
Greg Turnquist commented I've investigated how to apply this but can't seem to see hows CorsIntegrationTest (spring-data-tests-jpa) has:
When I update RepostoryRestMvcConfig with this:
...and comment out allowed methods, the test case still fails. So I have (yet) to figure out how to tweak the settings to plug in a different set of allowed methods |
Oliver Drotbohm commented This should be in place. I've reinstated more extensive default allowed HTTP methods that were accidentally removed in the fix for DATAREST-1535 |
Phil Webb opened DATAREST-1581 and commented
See spring-projects/spring-boot#22957 for background.
DATAREST-1535 makes
@CrossOrigin
annotations mandatory forPATCH
andPUT
methods. We've closed the original Boot issue so I'm opening this one to make sure it doesn't get lostIssue Links:
Backported to: 3.4.2 (2020.0.2), 3.3.6 (Neumann SR6), 3.2.12 (Moore SR12)
The text was updated successfully, but these errors were encountered: