Skip to content
Snippets Groups Projects
Unverified Commit 4f307d70 authored by Maksim Nabokikh's avatar Maksim Nabokikh Committed by GitHub
Browse files

Fix lint errors after merging AllowedHeaders feature (#3247)

parent 366e53c1
No related branches found
No related tags found
No related merge requests found
...@@ -150,7 +150,7 @@ type Web struct { ...@@ -150,7 +150,7 @@ type Web struct {
TLSCert string `json:"tlsCert"` TLSCert string `json:"tlsCert"`
TLSKey string `json:"tlsKey"` TLSKey string `json:"tlsKey"`
AllowedOrigins []string `json:"allowedOrigins"` AllowedOrigins []string `json:"allowedOrigins"`
AllowedHeaders []string `json:"allowedHeaders"` AllowedHeaders []string `json:"allowedHeaders"`
} }
// Telemetry is the config format for telemetry including the HTTP server config. // Telemetry is the config format for telemetry including the HTTP server config.
......
...@@ -265,7 +265,7 @@ func runServe(options serveOptions) error { ...@@ -265,7 +265,7 @@ func runServe(options serveOptions) error {
AlwaysShowLoginScreen: c.OAuth2.AlwaysShowLoginScreen, AlwaysShowLoginScreen: c.OAuth2.AlwaysShowLoginScreen,
PasswordConnector: c.OAuth2.PasswordConnector, PasswordConnector: c.OAuth2.PasswordConnector,
AllowedOrigins: c.Web.AllowedOrigins, AllowedOrigins: c.Web.AllowedOrigins,
AllowedHeaders: c.Web.AllowedHeaders, AllowedHeaders: c.Web.AllowedHeaders,
Issuer: c.Issuer, Issuer: c.Issuer,
Storage: s, Storage: s,
Web: c.Frontend, Web: c.Frontend,
......
...@@ -77,8 +77,8 @@ type Config struct { ...@@ -77,8 +77,8 @@ type Config struct {
// domain. // domain.
AllowedOrigins []string AllowedOrigins []string
// List of allowed headers for CORS requests on discovery, token, and keys endpoint. // List of allowed headers for CORS requests on discovery, token, and keys endpoint.
AllowedHeaders []string AllowedHeaders []string
// If enabled, the server won't prompt the user to approve authorization requests. // If enabled, the server won't prompt the user to approve authorization requests.
// Logging in implies approval. // Logging in implies approval.
...@@ -217,9 +217,9 @@ func newServer(ctx context.Context, c Config, rotationStrategy rotationStrategy) ...@@ -217,9 +217,9 @@ func newServer(ctx context.Context, c Config, rotationStrategy rotationStrategy)
if len(c.SupportedResponseTypes) == 0 { if len(c.SupportedResponseTypes) == 0 {
c.SupportedResponseTypes = []string{responseTypeCode} c.SupportedResponseTypes = []string{responseTypeCode}
} }
if len(c.AllowedHeaders) == 0 { if len(c.AllowedHeaders) == 0 {
c.AllowedHeaders = []string{"Authorization"} c.AllowedHeaders = []string{"Authorization"}
} }
allSupportedGrants := map[string]bool{ allSupportedGrants := map[string]bool{
grantTypeAuthorizationCode: true, grantTypeAuthorizationCode: true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment