summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/api.go2
-rw-r--r--routers/api/v1/org/member.go2
-rw-r--r--routers/web/user/notification.go3
3 files changed, 4 insertions, 3 deletions
diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go
index d11bbf3c06..d915b76f78 100644
--- a/routers/api/v1/api.go
+++ b/routers/api/v1/api.go
@@ -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)
diff --git a/routers/api/v1/org/member.go b/routers/api/v1/org/member.go
index 97940d5925..a6f140c38f 100644
--- a/routers/api/v1/org/member.go
+++ b/routers/api/v1/org/member.go
@@ -159,7 +159,7 @@ func IsMember(ctx *context.APIContext) {
}
}
- redirectURL := setting.AppURL + "api/v1/orgs/" + ctx.Org.Organization.Name + "/public_members/" + userToCheck.Name
+ redirectURL := setting.AppSubURL + "/api/v1/orgs/" + ctx.Org.Organization.Name + "/public_members/" + userToCheck.Name
ctx.Redirect(redirectURL, 302)
}
diff --git a/routers/web/user/notification.go b/routers/web/user/notification.go
index ec3395cbc1..080ec4b582 100644
--- a/routers/web/user/notification.go
+++ b/routers/web/user/notification.go
@@ -8,6 +8,7 @@ import (
"errors"
"fmt"
"net/http"
+ "net/url"
"strings"
"code.gitea.io/gitea/models"
@@ -86,7 +87,7 @@ func getNotifications(c *context.Context) {
// redirect to last page if request page is more than total pages
pager := context.NewPagination(int(total), perPage, page, 5)
if pager.Paginater.Current() < page {
- c.Redirect(fmt.Sprintf("/notifications?q=%s&page=%d", c.FormString("q"), pager.Paginater.Current()))
+ c.Redirect(fmt.Sprintf("%s/notifications?q=%s&page=%d", setting.AppSubURL, url.QueryEscape(c.FormString("q")), pager.Paginater.Current()))
return
}