Merge pull request #387 from sosedoff/url-prefix-env-var

Allow settings url prefix with URL_PREFIX env var
This commit is contained in:
Dan Sosedoff 2018-11-27 17:00:10 -06:00 committed by GitHub
commit 15d2e7917a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,6 +54,10 @@ func ParseOptions(args []string) (Options, error) {
opts.Url = os.Getenv("DATABASE_URL")
}
if opts.Prefix == "" {
opts.Prefix = os.Getenv("URL_PREFIX")
}
if os.Getenv("SESSIONS") != "" {
opts.Sessions = true
}