forked from forgejo/forgejo
Update documents for Gitea behind reverse proxy. Fix some small bugs (some URLs are generated without sub-path) (#17320)
* Apache `ProxyPassReverse` only works for Location, Content-Location and URI headers on HTTP redirect responses, it causes more problems than it resolves. Now all URLs generated by Gitee have the correct prefix AppSubURL. We do not need to set `ProxyPassReverse`. * fix url param * use AppSubURL instead of AppURL in api/v1 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
55885297f4
commit
e18ea9e349
5 changed files with 22 additions and 20 deletions
|
@ -576,7 +576,7 @@ func Routes(sessioner func(http.Handler) http.Handler) *web.Route {
|
|||
// Miscellaneous
|
||||
if setting.API.EnableSwagger {
|
||||
m.Get("/swagger", func(ctx *context.APIContext) {
|
||||
ctx.Redirect("/api/swagger")
|
||||
ctx.Redirect(setting.AppSubURL + "/api/swagger")
|
||||
})
|
||||
}
|
||||
m.Get("/version", misc.Version)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue