Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

464
Views
How to expose Swagger UI without authentication?

I'm trying to make the SwaggerUi interface not ask for authorization every time I boot.

I tried to enter in my Configure class:

.authorizeRequests().antMatchers("/actuator/**","/mypath/**").permitAll()

and

 .authorizeRequests().antMatchers("/mypath/**").permitAll()

but without success.

Actuator on the other hand works fine without authorization with this code structure

Thanks everyone for a possible answer!

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Try this:

 .authorizeRequests().antMatchers("/swagger-ui/**").permitAll()

Then just go here:

http://localhost:[YOUR PORT]/swagger-ui/

p.s Don't forget the / at the end of the URL :)

over 4 years ago · Santiago Trujillo Report

0

The basic problem is that even in the Sprinc-doc documentation they put you the case that you entered too. In order to make the code work you have to enter multiple permissions, one for each path. In your case it will have to be something like this:

.authorizeRequests().antMatchers("/actuator/**","/v2/**","/mypath/**","/swagger.yml","/anypath/").permitAll()
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!