Skip to content
This repository was archived by the owner on Dec 12, 2018. It is now read-only.

Commit 5845e63

Browse files
author
Mario
committed
1158 Undoing addtion of PUT in default CORS methods - It will be re-done in issue 1183
1 parent f28c07c commit 5845e63

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

extensions/servlet/src/main/resources/com/stormpath/sdk/servlet/config/web.stormpath.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,4 +355,4 @@ stormpath.web.cors.enabled = true
355355
#Comma separated list of allowed origins
356356
stormpath.web.cors.allowed.originUris =
357357
stormpath.web.cors.allowed.headers = Content-Type,Accept,X-Requested-With,remember-me
358-
stormpath.web.cors.allowed.methods = POST,GET,OPTIONS,DELETE,PUT
358+
stormpath.web.cors.allowed.methods = POST,GET,OPTIONS,DELETE

extensions/spring/boot/stormpath-webmvc-spring-boot-starter/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@
10241024
"name": "stormpath.web.cors.allowed.methods",
10251025
"type": "java.lang.String",
10261026
"description": "Comma separated list of allowed methods for a CORS request.",
1027-
"defaultValue": "POST,GET,OPTIONS,DELETE,PUT"
1027+
"defaultValue": "POST,GET,OPTIONS,DELETE"
10281028
}
10291029
]
10301030
}

extensions/spring/stormpath-spring-security-webmvc/src/test/groovy/com/stormpath/spring/config/CorsFilterIT.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class CorsFilterIT extends AbstractTestNGSpringContextTests {
106106
void testAccessControlRequestMethodRequestFailsForPUT() {
107107
mvc.perform(options(new URI("/me"))
108108
.header("Origin", "http://localhost:3000")
109-
.header("Access-Control-Request-Method", "HEAD") //HEAD is not allowed
109+
.header("Access-Control-Request-Method", "PUT") //HEAD is not allowed
110110
.accept(MediaType.APPLICATION_JSON))
111111
.andExpect(status().is(HttpServletResponse.SC_FORBIDDEN)); //403
112112

extensions/spring/stormpath-spring-webmvc/src/main/java/com/stormpath/spring/config/AbstractStormpathWebMvcConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ public abstract class AbstractStormpathWebMvcConfiguration {
410410
@Value("#{ @environment['stormpath.web.cors.allowed.headers'] ?: 'Content-Type,Accept,X-Requested-With,remember-me' }")
411411
protected String corsAllowedHeaders;
412412

413-
@Value("#{ @environment['stormpath.web.cors.allowed.methods'] ?: 'POST,GET,OPTIONS,DELETE,PUT' }")
413+
@Value("#{ @environment['stormpath.web.cors.allowed.methods'] ?: 'POST,GET,OPTIONS,DELETE' }")
414414
protected String corsAllowedMethods;
415415

416416
@Autowired(required = false)

0 commit comments

Comments
 (0)