Remove address variable - to make Locations use host value from config instead.
This commit is contained in:
parent
658310bc24
commit
0e1459c6b2
7
oauth.go
7
oauth.go
|
@ -222,13 +222,12 @@ func configureGiteaOauth(parentHandler *Handler, r *mux.Router, app *App) {
|
||||||
callbackLocation = app.Config().GiteaOauth.CallbackProxy
|
callbackLocation = app.Config().GiteaOauth.CallbackProxy
|
||||||
}
|
}
|
||||||
|
|
||||||
address := config.OrDefaultString(app.Config().GiteaOauth.Host, giteaHost)
|
|
||||||
oauthClient := giteaOauthClient{
|
oauthClient := giteaOauthClient{
|
||||||
ClientID: app.Config().GiteaOauth.ClientID,
|
ClientID: app.Config().GiteaOauth.ClientID,
|
||||||
ClientSecret: app.Config().GiteaOauth.ClientSecret,
|
ClientSecret: app.Config().GiteaOauth.ClientSecret,
|
||||||
ExchangeLocation: address + "/login/oauth/access_token",
|
ExchangeLocation: app.Config().GiteaOauth.Host + "/login/oauth/access_token",
|
||||||
InspectLocation: address + "/api/v1/user",
|
InspectLocation: app.Config().GiteaOauth.Host + "/api/v1/user",
|
||||||
AuthLocation: address + "/login/oauth/authorize",
|
AuthLocation: app.Config().GiteaOauth.Host + "/login/oauth/authorize",
|
||||||
HttpClient: config.DefaultHTTPClient(),
|
HttpClient: config.DefaultHTTPClient(),
|
||||||
CallbackLocation: callbackLocation,
|
CallbackLocation: callbackLocation,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue