microbin
microbin copied to clipboard
MICROBIN_PUBLIC_PATH not working correctly
Hello,
It seems that MICROBIN_PUBLIC_PATH is not working correctly.
To Reproduce I ran microbin on docker, with MICROBIN_PUBLIC_PATH=https://mydomain.tld/microbin/
behind a nginx reverse proxy:
location /microbin {
return 301 $scheme://$host/microbin/;
}
location /microbin/ {
set $upstream_app microbin;
set $upstream_port 8080;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
rewrite /microbin(.*) $1 break;
}
and uploading file was not working, so I had to add this to my nginx config:
`location /upload {
set $upstream_app microbin;
set $upstream_port 8080;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port/upload;
}`
and also the "?" which should redirect to /microbin/guide, does redirect to /guide
Same issue , I suppose the root cause is here https://github.com/szabodanika/microbin/blob/b8a0c5490d681550d982ad02d67a1aaa0897f503/templates/index.html#L284