Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

465
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda