hfs 0.38.3 → 0.40.0
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 +27 -2
- package/admin/assets/index-d654b69c.js +510 -0
- package/{frontend/assets/sha512-f5c4dbc2.js → admin/assets/sha512-e2cf8296.js} +1 -1
- package/admin/index.html +1 -1
- package/frontend/assets/index-31f0430a.js +94 -0
- package/frontend/assets/index-ffbcd4c9.css +1 -0
- package/{admin/assets/sha512-1d3d9f84.js → frontend/assets/sha512-5acbfc40.js} +1 -1
- package/frontend/fontello.css +10 -12
- package/frontend/fontello.woff2 +0 -0
- package/frontend/index.html +2 -2
- package/package.json +1 -1
- package/plugins/vhosting/plugin.js +1 -1
- package/src/api.auth.js +1 -1
- package/src/api.file_list.js +3 -1
- package/src/api.vfs.js +7 -2
- package/src/apiMiddleware.js +4 -2
- package/src/const.js +1 -1
- package/src/log.js +1 -1
- package/src/middlewares.js +7 -6
- package/src/misc.js +5 -1
- package/src/plugins.js +17 -8
- package/src/serveFile.js +47 -49
- package/src/serveGuiFiles.js +14 -12
- package/src/vfs.js +8 -7
- package/admin/assets/index-33978702.js +0 -510
- package/frontend/assets/index-6d4e81f7.css +0 -1
- package/frontend/assets/index-869b7be6.js +0 -94
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
|
|
193
|
-
|
|
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)
|