Handle HTTP/HTTPS protocol depending on dev env or not

This commit is contained in:
2022-11-07 01:35:06 +01:00
parent 356bfc6a86
commit e2ff98094b
6 changed files with 44 additions and 3 deletions

View File

@@ -14,7 +14,8 @@ func (op *OIDCHandler) WellKnownOIDCEndpoint(w http.ResponseWriter, r *http.Requ
var (
host = r.Host
namespace = mux.Vars(r)["namespace"]
issuer = fmt.Sprintf("http://%s/%s", host, namespace)
protocol = op.Protocol
issuer = fmt.Sprintf("%s://%s/%s", protocol, host, namespace)
)
response := map[string]any{