The README Docker and nginx examples no longer set WEBHOOKER_ENVIRONMENT=prod, which is now the default. The TRUSTED_PROXIES warning text in the README, config.go and its test now gives the real reason it ignores the environment: behind a proxy every client shares one bucket in dev and prod alike. Model: opus-5-5
This commit is contained in:
@@ -849,9 +849,8 @@ func TestEgressAllowlistWarning(t *testing.T) {
|
||||
// rate-limit bucket between every client, which turns the receiver
|
||||
// limits into service-wide ceilings and collapses login failure
|
||||
// counting. It must fire whenever TRUSTED_PROXIES is empty, in any
|
||||
// environment: the warning does not depend on WEBHOOKER_ENVIRONMENT,
|
||||
// since an operator who never configured the deployment is exactly the
|
||||
// one it exists to catch. It stays quiet once proxies are named.
|
||||
// environment, because behind a proxy every client shares one bucket
|
||||
// in dev and prod alike. It stays quiet once proxies are named.
|
||||
func TestSharedRateLimitBucketWarning(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
@@ -871,9 +870,6 @@ func TestSharedRateLimitBucketWarning(t *testing.T) {
|
||||
expectWarning: false,
|
||||
},
|
||||
{
|
||||
// An internet-exposed deployment whose operator set
|
||||
// WEBHOOKER_ENVIRONMENT=dev has exactly the exposure
|
||||
// the warning announces.
|
||||
name: "dev without trusted proxies warns",
|
||||
environment: config.EnvironmentDev,
|
||||
expectWarning: true,
|
||||
|
||||
Reference in New Issue
Block a user