You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using swag with fiber but I can't configure correctly the swagger definition to access the documentation behind a reverse proxy or multiple accesses.
In my use case I have three ways of accessing applications' documentation:
From the proxy using a custom host and path. Example: https://my-proxy/custom/path/swag/index.html
From the pod's direct IP. Example: http://123.123.1.2/swag/index.html
From a port forwarding, which basically follows the same rule of 2.
The problem: I can't make basePath dynamic. It will always have one single value. And because of that the Try it out button may only work from one of those access.
Would be nice to have in swag's implementation a way of adding a prefix to the basePath in the swag.ReadDoc() call (or a new one).
If this is implemented I will be able to change the implementation of gofiber's swagger to use the X-Forwarded-Prefix header as prefix for the basePath using swag.
I'm using swag with fiber but I can't configure correctly the swagger definition to access the documentation behind a reverse proxy or multiple accesses.
In my use case I have three ways of accessing applications' documentation:
https://my-proxy/custom/path/swag/index.html
http://123.123.1.2/swag/index.html
2.
The problem: I can't make
basePath
dynamic. It will always have one single value. And because of that theTry it out
button may only work from one of those access.Would be nice to have in swag's implementation a way of adding a prefix to the basePath in the
swag.ReadDoc()
call (or a new one).If this is implemented I will be able to change the implementation of gofiber's swagger to use the
X-Forwarded-Prefix
header as prefix for the basePath usingswag
.Thanks.
Openning by requested in swaggo/swag#1210
The text was updated successfully, but these errors were encountered: