1
0
mirror of https://github.com/coder/coder.git synced 2025-03-15 10:17:09 +00:00
This commit is contained in:
Steven Masley
2025-03-13 09:59:23 -05:00
parent 3d677f2b14
commit 5d3513e3a3
3 changed files with 12 additions and 6 deletions
enterprise
site/src/api

@ -264,7 +264,7 @@ func (r *RootCmd) proxyServer() *serpent.Command {
Tracing: tracer,
PrometheusRegistry: prometheusRegistry,
APIRateLimit: int(cfg.RateLimit.API.Value()),
SecureAuthCookie: cfg.SecureAuthCookie.Value(),
CookieConfig: cfg.HTTPCookies,
DisablePathApps: cfg.DisablePathApps.Value(),
ProxySessionToken: proxySessionToken.Value(),
AllowAllCors: cfg.Dangerous.AllowAllCors.Value(),

@ -70,7 +70,7 @@ type Options struct {
TLSCertificates []tls.Certificate
APIRateLimit int
SecureAuthCookie bool
CookieConfig codersdk.HTTPCookieConfig
DisablePathApps bool
DERPEnabled bool
DERPServerRelayAddress string
@ -310,8 +310,8 @@ func New(ctx context.Context, opts *Options) (*Server, error) {
Logger: s.Logger.Named("proxy_token_provider"),
},
DisablePathApps: opts.DisablePathApps,
SecureAuthCookie: opts.SecureAuthCookie,
DisablePathApps: opts.DisablePathApps,
Cookies: opts.CookieConfig,
AgentProvider: agentProvider,
StatsCollector: workspaceapps.NewStatsCollector(opts.StatsCollectorOptions),
@ -362,7 +362,7 @@ func New(ctx context.Context, opts *Options) (*Server, error) {
},
// CSRF is required here because we need to set the CSRF cookies on
// responses.
httpmw.CSRF(s.Options.SecureAuthCookie),
httpmw.CSRF(s.Options.CookieConfig),
)
// Attach workspace apps routes.

@ -640,7 +640,7 @@ export interface DeploymentValues {
readonly telemetry?: TelemetryConfig;
readonly tls?: TLSConfig;
readonly trace?: TraceConfig;
readonly secure_auth_cookie?: boolean;
readonly http_cookies?: HTTPCookieConfig;
readonly strict_transport_security?: number;
readonly strict_transport_security_options?: string;
readonly ssh_keygen_algorithm?: string;
@ -958,6 +958,12 @@ export interface GroupSyncSettings {
readonly legacy_group_name_mapping?: Record<string, string>;
}
// From codersdk/deployment.go
export interface HTTPCookieConfig {
readonly secure_auth_cookie?: boolean;
readonly same_site?: string;
}
// From health/model.go
export type HealthCode =
| "EACS03"