Caddy

Flow of an inbound network request
Figure 1. Flow of an inbound network request

Caddy seems to work without any special configuration for websockets. If you see websocket disconnects, you may need to increase timeouts; see Reverse proxies will close websockets. A simple Caddyfile works like this;

Caddyfile
http://olivetin.example.com {
        reverse_proxy * http://localhost:1337
}

Custom paths

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