Skip to content

Commit ab9fa14

Browse files
committed
Fixed cross
1 parent 6de4c20 commit ab9fa14

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

config-layers/common/in/erail/route/CORSRouteBuilder.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ log=true
66
enable=true
77

88
allowedOrigin=*
9-
allowedMethod=GET,POST,OPTIONS
9+
allowedMethod=DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT
1010
allowedCredentials=false
1111
maxAgeSeconds=86400
1212
allowedHeaders=Content-Type,Cache-Control,Authorization
13-

src/test/java/in/erail/route/CORSRouteBuilderTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import org.junit.Rule;
1313
import in.erail.glue.Glue;
1414
import io.netty.handler.codec.http.HttpHeaderNames;
15+
import io.vertx.core.http.HttpMethod;
1516

1617
/**
1718
*
@@ -41,7 +42,7 @@ public void testProcess(TestContext context) {
4142
.putHeader(HttpHeaders.ACCESS_CONTROL_REQUEST_HEADERS, "cache-control,content-type,postman-token")
4243
.handler(response -> {
4344
context.assertEquals(response.statusCode(), 200, response.statusMessage());
44-
context.assertEquals(response.getHeader(HttpHeaderNames.ACCESS_CONTROL_ALLOW_METHODS.toString()), "GET,POST,OPTIONS");
45+
context.assertEquals(response.getHeader(HttpHeaderNames.ACCESS_CONTROL_ALLOW_METHODS.toString()), "DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT");
4546
context.assertEquals(response.getHeader(HttpHeaderNames.ACCESS_CONTROL_ALLOW_ORIGIN.toString()), "*");
4647
context.assertEquals(response.getHeader(HttpHeaderNames.ACCESS_CONTROL_MAX_AGE.toString()), "3600");
4748
context.assertEquals(response.getHeader(HttpHeaderNames.ACCESS_CONTROL_ALLOW_HEADERS.toString()), "X-POST");

0 commit comments

Comments
 (0)