mirror of
https://github.com/gomods/athens
synced 2026-02-03 08:40:31 +00:00
Add an introduction page as the home page (#1945)
A default homepage is baked into the server that uses the request host address, or in HTTP 2 the authority. This includes ports. It also checks for schema. The values are used to indicate to users how to configure their go env Of course, this won't work on all installations - especially enterprise ones. For that, we've introduced ATHENS_HOME_TEMPLATE_PATH as an environment variable along with HomeTemplatePath in the config. This value defaults to /var/lib/athens/home.html but can be configured to any location that Athens can reliably read from. This is a Go HTML template so it should use Go HTML template formatting and logic.
This commit is contained in:
@@ -169,6 +169,10 @@ BasicAuthUser = ""
|
||||
# Env override: BASIC_AUTH_PASS
|
||||
BasicAuthPass = ""
|
||||
|
||||
# A path on disk to a Go HTML template to be used on the homepage
|
||||
# Env override: ATHENS_HOME_TEMPLATE_PATH
|
||||
HomeTemplatePath = "/var/lib/athens/home.html"
|
||||
|
||||
# Set to true to force an SSL redirect
|
||||
# Env override: PROXY_FORCE_SSL
|
||||
ForceSSL = false
|
||||
|
||||
Reference in New Issue
Block a user