title: How to set request interceptor in SwaggerUIBundle?
body: <p>In our <strong>swagger.json</strong> we are setting basePath to <strong>/api</strong>, however, when the application is deployed in docker container, the context path is not /api. This could be different thing and we don't know what it is so we can't hard code it. </p>
  
  <p>I am trying to set <strong>requestInterceptor</strong> as per the following guide, in order to catch the request and modify the url path perhaps:</p>
  
  <p><a href="https://swagger.io/docs/swagger-tools/#customization-36" rel="noreferrer">https://swagger.io/docs/swagger-tools/#customization-36</a></p>
  
  <p>But it seems <strong>requestInterceptor</strong> is being ignored. Is this possible? If not, how can I set the correct path at runtime?</p>
  
  <p>This is my code in <strong>index.html</strong></p>
  
  <pre><code>    window.onload = function() {
    // Build a system
    const ui = SwaggerUIBundle({
      url: "../api-docs/swagger.json",
      dom_id: '#swagger-ui',
      deepLinking: true,
      requestInterceptor: function(request) {
          window.alert(request);
      },
      presets: [
        SwaggerUIBundle.presets.apis,
        SwaggerUIStandalonePreset
      ],
      plugins: [
        SwaggerUIBundle.plugins.DownloadUrl
      ],
      layout: "StandaloneLayout"
    })
  
    window.ui = ui
  
  }
  </code></pre>
  
  <p>We are using <strong>Swagger 2.0</strong></p>