Upload / Up1

Client-side encrypted image host web server
MIT License
813 stars 97 forks source link

Webroot #37

Closed xataz closed 8 years ago

xataz commented 8 years ago

Hi,

Sorry for my bad english.

I tried to use up1 behind a reverse proxy, without use a sub-domain. I propose a feature that might add a webroot directly in server.conf. I'm not a developer, this feature is not perfect.

Thanks for read, and sorry for my english.

Regards, Xataz,

k3d3 commented 8 years ago

From a primary glance, looks good to me. I'll let the others look over it before merging, though.

andre-d commented 8 years ago

I have to take a look at just making everything relative and fix the root root problem. On Nov 1, 2015 10:11 PM, "Keith M" notifications@github.com wrote:

From a primary glance, looks good to me. I'll let the others look over it before merging, though.

— Reply to this email directly or view it on GitHub https://github.com/Upload/Up1/pull/37#issuecomment-152899691.

ultramancool commented 8 years ago

Wouldn't relative paths be a better solution here? On Nov 1, 2015 10:11 PM, "Keith M" notifications@github.com wrote:

From a primary glance, looks good to me. I'll let the others look over it before merging, though.

— Reply to this email directly or view it on GitHub https://github.com/Upload/Up1/pull/37#issuecomment-152899691.

k3d3 commented 8 years ago

Relative paths will work on the Javascript side, but on the server side it'll still need to know where the absolute paths are.

The alternative is having a middleman (nginx, etc.) rewrite the URL paths to accommodate the server, which may work for some, may not for others

ultramancool commented 8 years ago

We're assuming this is being used with a reverse proxy, which should be able to do that. On Nov 1, 2015 10:23 PM, "Keith M" notifications@github.com wrote:

Relative paths will work on the Javascript side, but on the server side it'll still need to know where the absolute paths are

— Reply to this email directly or view it on GitHub https://github.com/Upload/Up1/pull/37#issuecomment-152902002.

k3d3 commented 8 years ago

@xataz the reverse proxy you're using, does it allow you to rewrite URL paths? Something like nginx's rewrite parameter, as demonstrated here http://serverfault.com/questions/379675/nginx-reverse-proxy-url-rewrite

If so, we might want to drop the server-side stuff but keep the relative paths on the web side.

xataz commented 8 years ago

Exemple work with this feature : http://box.xataz.ovh/truc It's works with nginx reverse proxy :

location /truc {
proxy_pass http://127.0.0.1:8080;
}

The problem with rewrite, is that it is rewrite /static and /i path, a conflict with another location is possible. But if you are a example for nginx configuration without my feature, I'm interested :smile:.

Sorry for my english again, i'm french.

k3d3 commented 8 years ago

Hey xataz,

We're actually going to close this pull request, as we've revamped the server and are about to revamp the client UI code (for cleaner extensibility). We will keep in mind what you've added though, and will make the browser code work with non-root path.

Thanks for your PR!