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

View File

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