dotnet / dotnet/AspNetCore.Docs

Using relative swagger endpoint results in error

Open
#25,425 4 comments 0 reactions 0 assignees View on GitHub
re-Safia
Dominant language
C#
Stars
13.1k
Forks
24.6k
Avg merge
1d 3h
Merged PRs (30d)
97

Description

The documentation states, that when using reverse proxy, the Swagger endpoint should be set to a relative path using the `./` prefix. For example, `./swagger/v1/swagger.json` as shown in the screenshot bellow:
![image](https://user-images.githubusercontent.com/72510482/160146164-9061682f-e82c-4022-8c82-58b82d811d61.png)

Doing so results in error:
![image](https://user-images.githubusercontent.com/72510482/160146116-4a90b622-a905-4960-9e19-e51f8207b870.png)

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: 14fce65f-1337-58cb-2193-8d8e0e62792d
* Version Independent ID: 59222460-a971-e76e-4fe9-23d4d7d768ee
* Content: [Get started with Swashbuckle and ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/tutorials/getting-started-with-swashbuckle?view=aspnetcore-6.0&tabs=visual-studio&viewFallbackFrom=aspnetcore-2.2)
* Content Source: [aspnetcore/tutorials/getting-started-with-swashbuckle.md](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/tutorials/getting-started-with-swashbuckle.md)
* Product: **aspnet-core**
* Technology: **aspnetcore-tutorials**
* GitHub Login: @zuckerthoben
* Microsoft Alias: **scaddie**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.