Skip to content

Commit

Permalink
Add method DELETE, PUT into allowedMethods of CORS
Browse files Browse the repository at this point in the history
Because WebDriver also supports method DELETE,
so you couldn't use delete method unless adding that method
into allowed methods of Cross-Origin Filter.
  • Loading branch information
zcmgyu authored and shs96c committed Dec 2, 2019
1 parent 136c2e9 commit 1547e33
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -110,7 +110,7 @@ public JettyServer(BaseServerOptions options, HttpHandler handler) {
FilterHolder
filterHolder = servletContextHandler.addFilter(CrossOriginFilter.class, "/*", EnumSet
.of(DispatcherType.REQUEST));
filterHolder.setInitParameter("allowedOrigins", "*");
filterHolder.setInitParameter("allowedMethods", "GET,POST,PUT,DELETE,HEAD");

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

0 comments on commit 1547e33

Please sign in to comment.