Skip to content

Commit 1547e33

Browse files
zcmgyushs96c
authored andcommitted
Add method DELETE, PUT into allowedMethods of CORS
Because WebDriver also supports method DELETE, so you couldn't use delete method unless adding that method into allowed methods of Cross-Origin Filter.
1 parent 136c2e9 commit 1547e33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/server/src/org/openqa/selenium/jetty/server/JettyServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public JettyServer(BaseServerOptions options, HttpHandler handler) {
110110
FilterHolder
111111
filterHolder = servletContextHandler.addFilter(CrossOriginFilter.class, "/*", EnumSet
112112
.of(DispatcherType.REQUEST));
113-
filterHolder.setInitParameter("allowedOrigins", "*");
113+
filterHolder.setInitParameter("allowedMethods", "GET,POST,PUT,DELETE,HEAD");
114114

115115
// Warning user
116116
LOG.warning("You have enabled CORS requests from any host. "

0 commit comments

Comments
 (0)