Skip to content

Define separator for MultiStringFlag

Jaime Martinez requested to merge 531-fix-header-via-config-file into master

Allows initializing each MultiStringFlag using its own separator and defaults to , when not specified.

This change makes the -header flag use a ;; separator so that it can be defined inside a config file.

Closes #531 (closed)


$ cat gitlab-pages.conf

listen-http=127.0.0.1:3010,127.0.0.1:4010
header=X:1,2,3,2,3;;Y:2,223,2

$ ./gitlab-pages -config gitlab-pages.conf                                                                                
INFO[0000] GitLab Pages Daemon                           revision=f8b4c76 version=1.34.0
INFO[0000] URL: https://gitlab.com/gitlab-org/gitlab-pages
INFO[0000] Checking GitLab internal API availability
INFO[0000] GitLab internal pages status API connected successfully
pages.test:3010 127.0.0.1 - - [2021/01/19:11:01:52 +1100] "HEAD / HTTP/1.1" 404 3067 "" "curl/7.64.1" 0

Curling the service:

$ curl -I http://pages.test:3010/
HTTP/1.1 404 Not Found
Content-Type: text/html; charset=utf-8
X: 1,2,3,2,3
X-Content-Type-Options: nosniff
Y: 2,223,2
Date: Tue, 19 Jan 2021 00:01:52 GMT
Edited by Jaime Martinez

Merge request reports