3.4. Caddy - Path based

Caddyfile
....
	handle {$GLOBAL_PORTAL_PATH}/olivetin* {
			redir {$GLOBAL_PORTAL_PATH}/olivetin {$GLOBAL_PORTAL_PATH}/olivetin/
			uri strip_prefix {$GLOBAL_PORTAL_PATH}/olivetin
			basicauth {
					{$GLOBAL_USER} HASH
			}
			reverse_proxy * localhost:1337
	}
....

Note, because you are changing the default path (from / to /OliveTin/), you will need to tell the OliveTin webUI where to find the API.

You need to also set externalRestAddress in your config.yaml like this;

OliveTin config.yaml
externalRestAddress: http://myserver/OliveTin
actions:
....