title: Change Swagger UI request URL when I tap to "Execute" button
body: <p>I deployed my app on AWS. Also, I configured Nginx that <code>/api</code> prefix (<code>https://mywebsitename.com/api</code>) will be automatically redirected to <code>https://127.0.0.1:8080/</code>. </p>
  
  <p>Every HTTP request &amp; response works perfectly. </p>
  
  <p>Also, I added the swagger library to my app, with following configuration:</p>
  
  <pre><code>@Configuration
  @EnableSwagger2
  class SwaggerConfig {
      @Bean
      fun api(): Docket {
          return Docket(DocumentationType.SWAGGER_2)
              .select()
              .apis(RequestHandlerSelectors.any())
              .paths(PathSelectors.any())
              .build()
      }
  }
  </code></pre>
  
  <p>I use this two libraries:</p>
  
  <pre><code>implementation("io.springfox:springfox-swagger2:2.9.2")
  implementation("io.springfox:springfox-swagger-ui:2.9.2")
  </code></pre>
  
  <p>Everything works perfectly locally.</p>
  
  <p>The problem is:
  The swagger link (<a href="https://mywebsitename.com/api/swagger-ui.html" rel="nofollow noreferrer">https://mywebsitename.com/api/swagger-ui.html</a>) works perfectly, and everything is shown. But, when I tap to the "Try it out" button and make "Execute", it returns me <code>TypeError: Failed to fetch</code>. It happens because the request goes to <code>https://127.0.0.1:8080/some_endpoint</code>.</p>
  
  <p>Question is: How I can configure my spring boot app that when I tap to "Execute" button, the request will go to <code>https://mywebsitename.com/api/some_end_point</code></p>
  
  <p><a href="https://i.stack.imgur.com/ZN4ud.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZN4ud.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/7A75d.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7A75d.jpg" alt="enter image description here"></a></p>