Use base url to generate template links/redirects
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"net/http"
|
||||
|
||||
oidc "forge.cadoles.com/wpetit/goweb-oidc"
|
||||
"forge.cadoles.com/wpetit/goweb-oidc/internal/config"
|
||||
"github.com/pkg/errors"
|
||||
"gitlab.com/wpetit/goweb/logger"
|
||||
"gitlab.com/wpetit/goweb/middleware/container"
|
||||
@ -27,7 +28,10 @@ func handleLoginCallback(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
ctn := container.Must(ctx)
|
||||
conf := config.Must(ctn)
|
||||
|
||||
logger.Info(ctx, "user logged in", logger.F("sub", idToken.Subject))
|
||||
|
||||
http.Redirect(w, r, "/", http.StatusSeeOther)
|
||||
http.Redirect(w, r, conf.HTTP.PublicBaseURL+"/", http.StatusSeeOther)
|
||||
}
|
||||
|
Reference in New Issue
Block a user