mirror of
https://github.com/halverneus/static-file-server.git
synced 2024-11-24 09:05:30 +00:00
Modified help documentation for referer whitelisting to maintain alphabetical order and expected default value.
This commit is contained in:
parent
c3f3305dc7
commit
000acc0bf2
@ -45,6 +45,17 @@ ENVIRONMENT VARIABLES
|
||||
to a client without regard for the hostname.
|
||||
PORT
|
||||
The port used for binding. If not supplied, defaults to port '8080'.
|
||||
REFERRERS
|
||||
A comma-separated list of acceped Referrers based on the 'Referer' HTTP
|
||||
header. If incoming header value is not in the list, a 403 HTTP error is
|
||||
returned. To accept requests without a 'Referer' HTTP header in addition
|
||||
to the whitelisted values, include an empty value (either with a leading
|
||||
comma in the environment variable or with an empty list item in the YAML
|
||||
configuration file) as demonstrated in the second example. If not
|
||||
supplied the 'Referer' HTTP header is ignored.
|
||||
Examples:
|
||||
REFERRERS='http://localhost,https://some.site,http://other.site:8080'
|
||||
REFERRERS=',http://localhost,https://some.site,http://other.site:8080'
|
||||
SHOW_LISTING
|
||||
Automatically serve the index file for the directory if requested. For
|
||||
example, if the client requests 'http://127.0.0.1/' the 'index.html'
|
||||
@ -63,10 +74,6 @@ ENVIRONMENT VARIABLES
|
||||
The prefix to use in the URL path. If supplied, then the prefix must
|
||||
start with a forward-slash and NOT end with a forward-slash. If not
|
||||
supplied then no prefix is used.
|
||||
REFERRERS
|
||||
A comma-separated list of valid HTTP Referer prefixes. If incoming header
|
||||
value is not in this list, a 403 HTTP error is returned.
|
||||
Examples: 'http://localhost,https://some.site,http://other.site:8080'
|
||||
|
||||
CONFIGURATION FILE
|
||||
Configuration can also managed used a YAML configuration file. To select the
|
||||
@ -81,12 +88,21 @@ CONFIGURATION FILE
|
||||
folder: /web
|
||||
host: ""
|
||||
port: 8080
|
||||
referrers: []
|
||||
show-listing: true
|
||||
tls-cert: ""
|
||||
tls-key: ""
|
||||
url-prefix: ""
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Example config.yml with possible alternative values:
|
||||
----------------------------------------------------------------------------
|
||||
debug: true
|
||||
folder: /var/www
|
||||
port: 80
|
||||
referrers:
|
||||
- http://localhost
|
||||
- https://mydomain.com
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
USAGE
|
||||
|
Loading…
Reference in New Issue
Block a user