403 error on accessing swagger ui - spring boot 2.0 springfox-swagger2 (2.7.0,2.6.0,2.6.1)
See original GitHub issuePlease find below the pom dependency
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.6.1</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.6.1</version>
</dependency>
tried version 2.7.0, 2.6.1
security has been bypassed for swagger http.authorizeRequests().antMatchers(“/v2/api-docs”, “/configuration/ui”, “/swagger-resources”, “/configuration/security”, “/swagger-ui.html”, “/webjars/**”).permitAll();
it was working fine with spring boot 1.3 after upgrading to 2.0 facing 403 error
What kind of issue is this?
- There was an unexpected error accessing swagger-ui(type=Forbidden, status=403). Access Denied
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
spring boot - Swagger UI empty and gives 403 - Stack Overflow
The error message you get from the network tab indicates that the browser is able to load the swagger-ui.html file but is unable...
Read more >Developers - 403 error on accessing swagger ui - Bountysource
403 error on accessing swagger ui - spring boot 2.0 springfox-swagger2 (2.7.0,2.6.0,2.6.1)
Read more >Swagger UI getting 403 error even after adding resources in ...
Coding example for the question Swagger UI getting 403 error even after adding resources in the ignored list & overriding resourceHandlers-Springboot.
Read more >[SOLVED] 403 Forbidden for OpenApiSwagger in Spring Boot ...
I have Spring Boot application with Spring Security. After configure configuration-class localhost-Swagger return 403 Forbidden.
Read more >SpringBoot+Swagger Error: 403 Forbidden [How to Solve]
Springboot + swagger2 reports error 403 Forbidden. Error reporting reason. When creating a springboot project, if spring security ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That does not match what is prescribed in the documentation. Based on that it should have the following values.
Can only get this to work if I add @EnableSwagger2 just below @SpringBootApplication Then it works out of the box
But putting @EnableSwagger2 in a config class below @Configuration gives this error Not sure why this is?