feature

package
v1.49.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnforceIPRateLimits = Feature{
	EnvVariable: "FF_ENFORCE_IP_RATE_LIMITS",
}

EnforceIPRateLimits enforces ratelimiter package to drop requests TODO: remove https://gitlab.com/gitlab-org/gitlab-pages/-/issues/629

View Source
var HandleCacheHeaders = Feature{
	EnvVariable: "FF_HANDLE_CACHE_HEADERS",
}

HandleCacheHeaders enables handling cache headers when serving from compressed ZIP archives TODO: enable and remove https://gitlab.com/gitlab-org/gitlab-pages/-/issues/672

View Source
var RedirectsPlaceholders = Feature{
	EnvVariable: "FF_ENABLE_PLACEHOLDERS",
}

RedirectsPlaceholders enables support for placeholders in redirects file TODO: remove https://gitlab.com/gitlab-org/gitlab-pages/-/issues/620

Functions

This section is empty.

Types

type Feature

type Feature struct {
	EnvVariable string
	// contains filtered or unexported fields
}

func (Feature) Enabled

func (f Feature) Enabled() bool

Enabled reads the environment variable responsible for the feature flag if FF is disabled by default, the environment variable needs to be "true" to explicitly enable it if FF is enabled by default, variable needs to be "false" to explicitly disable it

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL