Add link to security policy from getenv.md (#1746)

Co-authored-by: Joe Mooring <joe@mooring.com>
This commit is contained in:
Robert Fekete 2022-11-11 07:10:27 +01:00 committed by GitHub
parent 7b4c517a6c
commit 300fff092e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,3 +41,6 @@ And then retrieve the values within a template:
{{ os.Getenv "MY_VAR1" }} --> foo {{ os.Getenv "MY_VAR1" }} --> foo
{{ os.Getenv "MY_VAR2" }} --> bar {{ os.Getenv "MY_VAR2" }} --> bar
``` ```
With Hugo v0.91.0 and later, you must explicitly allow access to environment variables. For details, review [Hugo's Security Policy](/about/security-model/#security-policy). By default, environment variables beginning with `HUGO_` are allowed when using the `os.Getenv` function.