Default is dev (internal/config/config.go:139-142), which disables the Secure cookie flag (internal/session/session.go:114) and enables Access-Control-Allow-Origin: * (internal/middleware/middleware.go:143). An operator who forgets the variable runs insecure in prod.
Done: default is prod; dev behavior requires explicitly setting WEBHOOKER_ENVIRONMENT=dev; docs updated.
From audit #303 (significant).
Default is `dev` (`internal/config/config.go:139-142`), which disables the `Secure` cookie flag (`internal/session/session.go:114`) and enables `Access-Control-Allow-Origin: *` (`internal/middleware/middleware.go:143`). An operator who forgets the variable runs insecure in prod.
Done: default is prod; dev behavior requires explicitly setting `WEBHOOKER_ENVIRONMENT=dev`; docs updated.
Scope narrowed after checking the current tree (#311). The session cookie's Secure flag no longer depends on the environment: it is decided per request from the transport since #269. The only remaining thing dev changes is the CORS middleware (internal/middleware/middleware.go, CORS()), which sends Access-Control-Allow-Origin: * on every route, authenticated pages included, in the default environment.
Definition of done, restated: WEBHOOKER_ENVIRONMENT defaults to prod; dev must be set explicitly; the README configuration table and the resolveEnvironment comment say so; make dev in the README Quick Start keeps working without the variable (nothing in the UI needs CORS). Tests cover the default and the explicit dev.
Model: fable-5-1
Scope narrowed after checking the current tree (https://git.eeqj.de/sneak/webhooker/issues/311). The session cookie's Secure flag no longer depends on the environment: it is decided per request from the transport since https://git.eeqj.de/sneak/webhooker/issues/269. The only remaining thing `dev` changes is the CORS middleware (`internal/middleware/middleware.go`, `CORS()`), which sends `Access-Control-Allow-Origin: *` on every route, authenticated pages included, in the default environment.
Definition of done, restated: `WEBHOOKER_ENVIRONMENT` defaults to `prod`; `dev` must be set explicitly; the README configuration table and the `resolveEnvironment` comment say so; `make dev` in the README Quick Start keeps working without the variable (nothing in the UI needs CORS). Tests cover the default and the explicit `dev`.
Model: fable-5-1
clawbot
added this to the 1.0.0 milestone 2026-09-21 09:20:32 +02:00
Implemented in #322 (base next). WEBHOOKER_ENVIRONMENT now defaults to prod; dev must be set explicitly. The only behaviour this changes is the CORS middleware, which no longer answers every origin with Access-Control-Allow-Origin: * unless dev is set. The README configuration table and prose and the resolveEnvironment comment record the new default, and make dev in the Quick Start still works without the variable. Tests cover the default and the explicit dev. The TRUSTED_PROXIES startup warning is unaffected: it fires in every environment when the list is empty and never depended on the setting.
Model: opus-4-8
Implemented in https://git.eeqj.de/sneak/webhooker/pulls/322 (base `next`). `WEBHOOKER_ENVIRONMENT` now defaults to `prod`; `dev` must be set explicitly. The only behaviour this changes is the CORS middleware, which no longer answers every origin with `Access-Control-Allow-Origin: *` unless `dev` is set. The README configuration table and prose and the `resolveEnvironment` comment record the new default, and `make dev` in the Quick Start still works without the variable. Tests cover the default and the explicit `dev`. The `TRUSTED_PROXIES` startup warning is unaffected: it fires in every environment when the list is empty and never depended on the setting.
Model: opus-4-8
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
From audit #303 (significant).
Default is
dev(internal/config/config.go:139-142), which disables theSecurecookie flag (internal/session/session.go:114) and enablesAccess-Control-Allow-Origin: *(internal/middleware/middleware.go:143). An operator who forgets the variable runs insecure in prod.Done: default is prod; dev behavior requires explicitly setting
WEBHOOKER_ENVIRONMENT=dev; docs updated.Scope narrowed after checking the current tree (#311). The session cookie's Secure flag no longer depends on the environment: it is decided per request from the transport since #269. The only remaining thing
devchanges is the CORS middleware (internal/middleware/middleware.go,CORS()), which sendsAccess-Control-Allow-Origin: *on every route, authenticated pages included, in the default environment.Definition of done, restated:
WEBHOOKER_ENVIRONMENTdefaults toprod;devmust be set explicitly; the README configuration table and theresolveEnvironmentcomment say so;make devin the README Quick Start keeps working without the variable (nothing in the UI needs CORS). Tests cover the default and the explicitdev.Model: fable-5-1
Implemented in #322 (base
next).WEBHOOKER_ENVIRONMENTnow defaults toprod;devmust be set explicitly. The only behaviour this changes is the CORS middleware, which no longer answers every origin withAccess-Control-Allow-Origin: *unlessdevis set. The README configuration table and prose and theresolveEnvironmentcomment record the new default, andmake devin the Quick Start still works without the variable. Tests cover the default and the explicitdev. TheTRUSTED_PROXIESstartup warning is unaffected: it fires in every environment when the list is empty and never depended on the setting.Model: opus-4-8