{"action":"created","issue":{"url":"https://api.github.com/repos/RSuter/NSwag/issues/1108","repository_url":"https://api.github.com/repos/RSuter/NSwag","labels_url":"https://api.github.com/repos/RSuter/NSwag/issues/1108/labels{/name}","comments_url":"https://api.github.com/repos/RSuter/NSwag/issues/1108/comments","events_url":"https://api.github.com/repos/RSuter/NSwag/issues/1108/events","html_url":"https://github.com/RSuter/NSwag/issues/1108","id":283810753,"number":1108,"title":"Base URL for Swagger UI behind a load balancer/proxy","user":{"login":"kajaj","id":16337740,"avatar_url":"https://avatars3.githubusercontent.com/u/16337740?v=4","gravatar_id":"","url":"https://api.github.com/users/kajaj","html_url":"https://github.com/kajaj","followers_url":"https://api.github.com/users/kajaj/followers","following_url":"https://api.github.com/users/kajaj/following{/other_user}","gists_url":"https://api.github.com/users/kajaj/gists{/gist_id}","starred_url":"https://api.github.com/users/kajaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kajaj/subscriptions","organizations_url":"https://api.github.com/users/kajaj/orgs","repos_url":"https://api.github.com/users/kajaj/repos","events_url":"https://api.github.com/users/kajaj/events{/privacy}","received_events_url":"https://api.github.com/users/kajaj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-21T08:46:24Z","updated_at":"2017-12-21T09:00:50Z","closed_at":null,"author_association":"NONE","body":"We have started moving our public API to the Swagger framework and decided to use NSwag to do that. There is one issue with our Swagger UI though. As the public API always lives behind a proxy, the base url is always wrong (it always points to localhost instead of the public url), which means that the UI can only be used as documentation and not as an actually interactive service where you can try out requests. \r\n\r\nIs there a way to set the base url for UI only?\r\n\r\nThis is how we define (and start) the swagger UI:\r\n\r\n      app.UseMvc();      \r\n      var swaggerUiSettings = new SwaggerUiSettings\r\n      {\r\n        DefaultPropertyNameHandling = NJsonSchema.PropertyNameHandling.CamelCase,\r\n        DefaultEnumHandling = NJsonSchema.EnumHandling.String,\r\n        IsAspNetCore = true,\r\n        Title = \"API\",\r\n        Version = \"v1\",\r\n        SwaggerUiRoute = \"\"\r\n      };\r\n\r\n      app.UseSwaggerUi(typeof(Startup).Assembly, swaggerUiSettings);"},"comment":{"url":"https://api.github.com/repos/RSuter/NSwag/issues/comments/353295890","html_url":"https://github.com/RSuter/NSwag/issues/1108#issuecomment-353295890","issue_url":"https://api.github.com/repos/RSuter/NSwag/issues/1108","id":353295890,"user":{"login":"RSuter","id":2603405,"avatar_url":"https://avatars1.githubusercontent.com/u/2603405?v=4","gravatar_id":"","url":"https://api.github.com/users/RSuter","html_url":"https://github.com/RSuter","followers_url":"https://api.github.com/users/RSuter/followers","following_url":"https://api.github.com/users/RSuter/following{/other_user}","gists_url":"https://api.github.com/users/RSuter/gists{/gist_id}","starred_url":"https://api.github.com/users/RSuter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RSuter/subscriptions","organizations_url":"https://api.github.com/users/RSuter/orgs","repos_url":"https://api.github.com/users/RSuter/repos","events_url":"https://api.github.com/users/RSuter/events{/privacy}","received_events_url":"https://api.github.com/users/RSuter/received_events","type":"User","site_admin":false},"created_at":"2017-12-21T09:00:50Z","updated_at":"2017-12-21T09:00:50Z","author_association":"OWNER","body":"You can change the host, scheme, etc. with the `PostProcess` callback of the SwaggerUiSettings"}}
{"actor":{"display_login":"RSuter"}}