So using dot-separated string in CADDY_DOCKER_LABEL_PREFIX should be a good way to keep naming style consistent with other labels and should be supported.
This PR fixes it by canonicalizing the label prefix to "caddy", so meta characters in user provided label prefix will not affect cdp's block parsing.
When
CADDY_DOCKER_LABEL_PREFIX
contains dots, parsing of blocks will break.e.g. With
CADDY_DOCKER_LABEL_PREFIX=mydomain.gitlab.caddy
, cdp will yield error:Then wrongly parsed block is:
It is because
gitlab.caddy
inmydomain.gitlab.caddy
also gets parsed as path.Using dots in prefix conforms to what docker has adopted in their labels, e.g.:
So using dot-separated string in
CADDY_DOCKER_LABEL_PREFIX
should be a good way to keep naming style consistent with other labels and should be supported.This PR fixes it by canonicalizing the label prefix to
"caddy"
, so meta characters in user provided label prefix will not affect cdp's block parsing.