Last active 6 months ago
0
0
1
| 1 | func oauth(ctx echo.Context) error { |
| 2 | provider := ctx.Param("provider") |
| 3 | |
| 4 | httpProtocol := "http" |
| 5 | if ctx.Request().TLS != nil || ctx.Request().Header.Get("X-Forwarded-Proto") == "https" { |
| 6 | httpProtocol = "https" |
| 7 | } |
| 8 | forwarded_hdr := ctx.Request().Header.Get("Forwarded") |
| 9 | if forwarded_hdr != "" { |
| 10 | fields := strings.Split(forwarded_hdr, ";") |