From 6264475c05dea5d1b970527eb444f823b64c4e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Ch=C3=A1vez?= Date: Tue, 26 Sep 2023 09:45:50 +0200 Subject: [PATCH] docs: adds no_fs_access build tag to docs. --- README.md | 3 ++- internal/environment/default.go | 3 ++- internal/environment/nofsaccess.go | 2 -- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c1e04a0ce..8a9738b8c 100644 --- a/README.md +++ b/README.md @@ -93,13 +93,14 @@ func main() { Go build tags can tweak certain functionality at compile-time. These are for advanced use cases only and do not have compatibility guarantees across minor versions - use with care. -* coraza.disabled_operators.* - excludes the specified operator from compilation. Particularly useful if overriding +* `coraza.disabled_operators.*` - excludes the specified operator from compilation. Particularly useful if overriding the operator with `plugins.RegisterOperator` to reduce binary size / startup overhead. * `coraza.rule.multiphase_valuation` - enables evaluation of rule variables in the phases that they are ready, not only the phase the rule is defined for. * `memoize_builders` - enables memoization of builders for regex and aho-corasick dictionaries to reduce memory consumption in deployments that launch several coraza instances. For more context check [this issue](https://github.com/corazawaf/coraza-caddy/issues/76) +* `no_fs_access` - indicates that the target environment has no access to FS in order to not leverage OS' filesystem related functionality e.g. file body buffers. ## E2E Testing diff --git a/internal/environment/default.go b/internal/environment/default.go index 214a4576f..522045b71 100644 --- a/internal/environment/default.go +++ b/internal/environment/default.go @@ -6,5 +6,6 @@ package environment -// HasAccessToFS indicates whether the build environment is TinyGo. +// HasAccessToFS indicates whether the runtime target environment has access +// to OS' filesystem or not. var HasAccessToFS = true diff --git a/internal/environment/nofsaccess.go b/internal/environment/nofsaccess.go index f283e3fbc..e1bbaab20 100644 --- a/internal/environment/nofsaccess.go +++ b/internal/environment/nofsaccess.go @@ -6,6 +6,4 @@ package environment -// HasAccessToFS indicates whether the build environment has access -// to filesystem or not. var HasAccessToFS = false