Open JulianWebb opened 2 years ago
Changing the function to
private function setProtocol($url){
$baseurl = substr($url,strpos($url,'/'));
return $baseurl;
}
causes the site to work normally, though it does make some of the printed links look wrong.
It looks like the RSS Builders run into a similar issue.
ComicControl v4.2.9
Description of Problem
When using ComicControl behind a reverse proxy (in this case, Traefik), it defaults to using the
HTTP
scheme on it's URLs rather than follow the scheme set in the root option during the installation process.Steps to Reproduce
These steps assume you have a server running Docker v20.10.17 or later with the Compose Plugin and a Traefik container running and monitoring on the
outbound
network.docker-compose.yml
in the project directoryservices: nginx: image: lscr.io/linuxserver/nginx:latest container_name: comiccontrol_nginx environment:
example.org
)"networks: comiccontrol: outbound: external: true
Stop the docker containers (
docker compose down
) and restart themGo to
example.org/comiccontrol/
to set up the install, make sure to configure the root to have theHTTPS
schemeTry using the site after install and find it's linking things as
HTTP
Potential Solution
It seems the culprit is this function designed to disregard the scheme of the root value in favour of the one being use to request the document.
I would recommend dropping this function, either by trusting the root value's scheme or by utilizing the the relative reference resolution that dropping the scheme would provide (e.g. "//example.org")