Skip to content

Commit

Permalink
allowed OPTIONS requests
Browse files Browse the repository at this point in the history
  • Loading branch information
kolya-t committed Mar 23, 2018
1 parent b9e971b commit 2d5adff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.teapot</groupId>
<artifactId>teapot-backend</artifactId>
<version>3.0.1</version>
<version>3.0.2</version>
<packaging>jar</packaging>

<parent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
Expand All @@ -20,6 +21,7 @@ public WebSecurityConfig() {

@Override
public void configure(WebSecurity web) throws Exception {
web.ignoring().antMatchers("/h2/**");
web.ignoring().antMatchers("/h2/**").and()
.ignoring().antMatchers(HttpMethod.OPTIONS, "/**");
}
}

2 comments on commit 2d5adff

@serjihsklovski
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

но зотчем?

@kolya-t
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Потому что запросы авторизации от аксиоса фейлились

Please sign in to comment.