hfs 0.38.3 → 0.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -42,6 +42,7 @@ This is a full rewrite of [the Delphi version](https://github.com/rejetto/hfs2).
42
42
  - multi-language front-end
43
43
  - virtual hosting (plug-in)
44
44
  - anti-brute-force (plug-in)
45
+ - reverse-proxy support
45
46
 
46
47
  ## Installation
47
48
 
@@ -189,8 +190,8 @@ Valid keys in a node are:
189
190
  - `false`: no one can.
190
191
  - `"*"`: any account can, i.e. anyone who logged in.
191
192
  - `[ frank, peter ]`: the list of accounts who can.
192
- - `can_see`: specify who can see this entry. Even if a user can download you can still make the file not appear in the list.
193
- Remember that to see in the list you must also be able to download (read), or else you won't see it anyway. Value is a `WhoCan` descriptor, refer above.
193
+ - `can_see`: specify who can see this element. Even if a user can download you can still make the file not appear in the list.
194
+ Value is a `WhoCan` descriptor, refer above.
194
195
  - `can_upload` specify who can upload. Applies to folders with a source. Default is none.
195
196
  - `can_delete` specify who can delete. Applies to folders with a source. Default is none.
196
197
  - `masks`: maps a file mask to a set of properties as the one documented in this section. E.g.
@@ -230,6 +231,30 @@ For each account entries, this is the list of properties you can have:
230
231
  - `admin` set `true` if you want to let this account log in to the Admin-panel. Default is `false`.
231
232
  - `belongs` an array of usernames of other accounts from which to inherit their permissions. Default is none.
232
233
 
234
+ ## Reverse proxy
235
+
236
+ HFS can work behind a reverse proxy. Configuration depends on what software you use, but this is an example using nginx
237
+ exposing HFS under the path `/files/` instead of just `/`. Adjust it to suit your needs.
238
+
239
+ ```
240
+ location /files/ {
241
+ proxy_http_version 1.1;
242
+ keepalive_timeout 30;
243
+ proxy_buffering off;
244
+ proxy_redirect off;
245
+ proxy_max_temp_file_size 0;
246
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # forward IP address
247
+ proxy_set_header X-forwarded-prefix "/files"; # the location without final slash
248
+ client_max_body_size 0; # disable max size for uploads
249
+ proxy_pass http://127.0.0.1:80/;
250
+ }
251
+ ```
252
+
253
+ This is enough, but you may want to configure generated links accordingly:
254
+ - go to Admin-panel > Shared files > Home > Link
255
+ - click the change button (right side of the field)
256
+ - enter the final URL of your proxy including the location
257
+
233
258
  ## License
234
259
 
235
260
  [GPLv3](https://github.com/rejetto/hfs/blob/master/LICENSE.txt)