Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MICROBIN_PUBLIC_PATH not working correctly #248

Open
azertylr opened this issue Jan 25, 2024 · 1 comment
Open

MICROBIN_PUBLIC_PATH not working correctly #248

azertylr opened this issue Jan 25, 2024 · 1 comment

Comments

@azertylr
Copy link

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

@phuslu
Copy link

phuslu commented Feb 19, 2024

Same issue , I suppose the root cause is here

xhr.open('POST', '/upload', true);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants