1
0
mirror of https://codeberg.org/crowci/crow.git synced 2025-08-12 06:02:53 +03:00

Fix UI and backend paths with subpath (#1799)

I'm not sure if this is an ideal fix for this, but it seems to work for
me. If you have another idea just let me know.

Closes #1798 
Closes #1773
This commit is contained in:
qwerty287
2023-08-07 16:05:18 +02:00
committed by GitHub
parent 10b1cfcd3b
commit 67b7de5cc2
30 changed files with 162 additions and 101 deletions

View File

@@ -395,9 +395,9 @@ func (c *client) newConfig(req *http.Request) *oauth2.Config {
intendedURL := req.URL.Query()["url"]
if len(intendedURL) > 0 {
redirect = fmt.Sprintf("%s/authorize?url=%s", server.Config.Server.OAuthHost, intendedURL[0])
redirect = fmt.Sprintf("%s%s/authorize?url=%s", server.Config.Server.OAuthHost, server.Config.Server.RootPath, intendedURL[0])
} else {
redirect = fmt.Sprintf("%s/authorize", server.Config.Server.OAuthHost)
redirect = fmt.Sprintf("%s%s/authorize", server.Config.Server.OAuthHost, server.Config.Server.RootPath)
}
return &oauth2.Config{