Comments (8)
In order to use goploader with a reverse proxy and for it to serve HTTPS links, you have to set the X-Forwarded-Proto
header in your proxy configuration. Otherwise goploader can't determine whether or not the request was HTTP or HTTPS (because it has no knowledge of your proxy and your proxy's configuration).
As for the subdirectory, I'm sorry but I don't get it. Could you give me an example of what you're trying to achieve ?
from goploader.
Related to #38
from goploader.
Hi,
I wanted to have a proxy using a subdir (virtual) like https://mydomain/goploader
and forward this to the goploader server via http. I think the issue concernig the subdir was a configureation fault on my site. But the link produced by goploader is http, because it is requested via http by the proxy. Can I change this without using https between the proxy and goploader?
Thanks in advance
Ronny
from goploader.
Hi,
I don't think this is related to goploader itself. It's more of a configuration problem on your proxy. It is not related on how your proxy talks to goploader, it's about the information sent by your proxy.
For example, here is my Caddy configuration :
gpldr.in up.depado.eu {
proxy / 127.0.0.1:8002 {
proxy_header Host {host}
proxy_header X-Real-IP {remote}
proxy_header X-Forwarded-Proto {scheme}
}
gzip
}
This is actually quite simple : Simply forward the protocol your proxy receives to the goploader server, and it will send back a link with the appropriate protocol. (Meaning, if someone sends an http request, goploader will send back an http link, same applies if someone sends an https request)
nginx
proxy_set_header X-Forwarded-Proto $scheme;
(both http and https)
or
proxy_set_header X-Forwarded-Proto "https;
(only https)
Apache
RequestHeader set X-Forwarded-Proto 'https' env=HTTPS
(both http and https)
or
RequestHeader set X-Forwarded-Proto "https"
(only https)
Caddy
proxy_header X-Forwarded-Proto {scheme}
Hope this helps
EDIT: About the subdirectory stuff, you should customize your name_server
to mydomain.com/goploader
I think. Although I did not test that.
from goploader.
Hi,
the parameter RequestHeader
for apache works. THX!
The other issue with subdirs did not work. Because I will protect this site using username and password, this is no showstopper ;-)
If you are interested in: the index.html has to be changed to link the .js files to the subfolder. But if you want to upload a file, jquery uses the absolute path ( / ) and so it does not work. I did not find where to configure that ...
from goploader.
So the second issue is about the way static files are handled. I'll have a look later. Thanks for the feedback :)
from goploader.
I got it to work with a subdir, e.g. http://my.server.com/gop/
First of all I had to replace all \static\
href and script src in index.html
with /gop/static/
.
Then to make the upload script work in custom.js
change url (line 106) to '/gop/'.
And then to have the download links displayed correct, append /gop
to my name_server
variable in the config file.
So based on that it shouldn't be too difficult to make it work with a base_dir
variable in the config file. I haven't looked at the code at all, though.
from goploader.
Thanks for your input @stiobhan !
It's been a while I haven't worked on goploader, though I intend to work on it again soon.
There are multiple issues and enhancements that need some work.
from goploader.
Related Issues (20)
- Protect upload with password HOT 5
- See uploaded files in the web client HOT 1
- Question: Using a database on another server HOT 1
- Caddyfile review HOT 2
- Uploaded text downloads as STDIN HOT 8
- DEMAIN BOXE HOT 4
- DEMAIN BOXE HOT 3
- language and lines option HOT 2
- Installation error - cannot use "github.com/boltdb/bolt".Options literal HOT 5
- How can i make it support the format of SWF? HOT 3
- Cannot compile latest version from master HOT 2
- token : how tu use it HOT 1
- Serve from several domains HOT 4
- Uploading from a URL HOT 1
- [Feature request] Allow unlimited duration HOT 3
- gpldr.in? HOT 6
- Official Docker image HOT 1
- Server Downloads is broken HOT 2
- Failing to build using docker golang container HOT 7
- runtime error: invalid memory address or nil pointer dereference HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from goploader.