Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

466
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda