title: Swagger Doc not working after adding ssl to domain
body: <p>I had swagger docs working fine in my spring boot app. However it suddenly stopped working after I added <code>https</code> to my domain. All endpoints kept returning <code>TypeError: Failed To Fetch</code></p>
  <p>below is my swagger config</p>
  <pre><code>public class SwaggerConfig {
  
  @Bean
  public Docket api() {
      return new Docket(DocumentationType.SWAGGER_2).select()
              .apis(RequestHandlerSelectors.any()).paths(PathSelectors.any()).build()
              .apiInfo(apiInfo()).securitySchemes(Lists.newArrayList(apiKey()))
              .securityContexts(Arrays.asList(securityContext()));
  }
  
  private ApiKey apiKey() {
      return new ApiKey(&quot;Bearer&quot;, &quot;Authorization&quot;, &quot;header&quot;);
  }
  
  private SecurityContext securityContext() {
      return SecurityContext.builder().securityReferences(defaultAuth())
              .forPaths(PathSelectors.any()).build();
  }
  
  private List&lt;SecurityReference&gt; defaultAuth() {
      AuthorizationScope authorizationScope = new AuthorizationScope(&quot;global&quot;,
              &quot;accessEverything&quot;);
      AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
      authorizationScopes[0] = authorizationScope;
      return Arrays.asList(new SecurityReference(&quot;Bearer&quot;, authorizationScopes));
  }
  </code></pre>
  <p>Spring Security Config to let swagger be accessible</p>
  <pre><code>    @Override
  public void configure(WebSecurity web) {
      web.ignoring().antMatchers(&quot;/v2/api-docs&quot;, &quot;/configuration/ui&quot;,
              &quot;/swagger-resources/**&quot;, &quot;/configuration/**&quot;, &quot;/swagger-ui.html&quot;,
              &quot;/swagger-resources&quot;, &quot;/webjars/**&quot;, &quot;/csrf&quot;, &quot;/&quot;);
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/iSsaW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iSsaW.png" alt="enter image description here" /></a></p>
  <p>Please does anyone understand how to solve this</p>