mirror of
https://github.com/writeas/writefreely
synced 2025-02-02 07:56:55 +01:00
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
|
||||
}
|
||||
|
||||
address := config.OrDefaultString(app.Config().GiteaOauth.Host, giteaHost)
|
||||
oauthClient := giteaOauthClient{
|
||||
ClientID: app.Config().GiteaOauth.ClientID,
|
||||
ClientSecret: app.Config().GiteaOauth.ClientSecret,
|
||||
ExchangeLocation: address + "/login/oauth/access_token",
|
||||
InspectLocation: address + "/api/v1/user",
|
||||
AuthLocation: address + "/login/oauth/authorize",
|
||||
ExchangeLocation: app.Config().GiteaOauth.Host + "/login/oauth/access_token",
|
||||
InspectLocation: app.Config().GiteaOauth.Host + "/api/v1/user",
|
||||
AuthLocation: app.Config().GiteaOauth.Host + "/login/oauth/authorize",
|
||||
HttpClient: config.DefaultHTTPClient(),
|
||||
CallbackLocation: callbackLocation,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user