rejetto forum

Recent Posts

HFS ~ HTTP File Server / Re: Changing HTTP response header
« Last post by RedyAu on Today at 07:21:09 AM »
Great, thank you!
HFS ~ HTTP File Server / Re: Changing HTTP response header
« Last post by danny on Yesterday at 03:32:15 PM »
Here is the events file that I use to cause caching
At hfs console, press Alt+F6 to edit events file
Code: [Select]
{.if|{.match|*.jpg;*.JPG;*.jpeg;*.gif;*.png;*.ico;*.mp3;*.mp4;*.mkv;/*img*;*.js|%url%.}|{:{.add header|Cache-Control: public, max-age=604800.}{.add header|Vary: Accept-Encoding.}:}.}

for no cache {.add header|Cache-Control: no-cache, max-age=0.}
HFS ~ HTTP File Server / Re: Changing HTTP response header
« Last post by RedyAu on May 07, 2021, 11:27:31 PM »
I believe "necroposting" may be forgiven this time, as I think this might be a relevant question for anyone finding this in the future.
The above described way of setting a response header for the whole page in general works, but it doesn't "cascade" to all files contained within.
I have a constantly updating image on this link:
 What I'd like to do is set a no-cache header so that I can use it on other sites and not have it cached, so it updates.
Is there any way to achieve per-file header settings, or just a way to set headers returned for all files? I wouldn't mind all files served with this header either.
F.A.Q.s / Re: ban a user for a period
« Last post by HFS95 on May 07, 2021, 05:41:40 PM »
thank you, but i havn't test it yet...

ive an other question... is there the possibility to ban an IP from a special folder?
Hey, have you tested it? Did it work? I'm looking for something similar...
Thank you already  :)
Deutsch / Re: german article - Artikel: Installationsanleitung auf Deutsch
« Last post by HFS95 on May 07, 2021, 05:33:12 PM »
Hier ist ein weiterer "technisch weniger versierter Benutzer", wie oben so schön gesagt, der sich herzlich bedankt  ;) ;D Finde es auch äußerst hilfreich
Many anti-virus vendors regard "non-professional" web servers (or what would act like a server) a virus.

You can see the "virus" code names, many say HFS is a malicious thing because it is HFS.  ::)

Do not be anxious. HFS is free (as in freedom) and open source software. Anyone can check it's source code and do real safe analytics.

So, never trust those proprietary vendors. The only thing they can do is to cheat people that uses free (libre) software.
This cant be True  this is for people running 2.3m or older   version 2.4 does not have any issues yet




A Variant Of Win32/Server-Web.HFS.A Potentially Unsafe




PUA.Presenoker!8.F608 (CLOUD)

Http File Server (PUA)


...the file can be only accessed by a specific IP...
At HFS console, press alt+f6 to edit events file, and add this:
Code: [Select]
replace  myparticularfile.doc  with target file name (to block for most)
replace  with target IP address (to allow for one)

P.S. Other options instead of  myparticularfile.doc may be /folder* or *.doc and you can even add to the list, such as myparticularfile.doc;myotherfile.txt;*.pdf with semicolon in-between. 

P.P.S. If this method seems clunky, then you could use the more normal and flexible users/groups/passwords, located in hfs menu > other options > user accounts.  And, then you can right-click on a particular folder/file to set it private to your users/groups. 
Programmers corner / Re: Template/events for QOS or traffic shaping.
« Last post by danny on April 29, 2021, 03:01:40 PM »
...a variable is defined by its name which can include letters or numbers and preceded by # to become a global variable
just include %ip% in the name
{.set|#flag_%ip%| ....   .}
Thanks Mars! 
if only one particular ip should be able to access the folder, add something similar in the diff template of the folder properties

either by using a forced disconnection
Code: [Select]

or even better by using a redirect which gives the user the impression of an invalid link

Code: [Select]
{.if|{.=|%ip%|}|{:{.redirect|../ .}:}.}

replace by the allowed ip

a more concrete example is to only give access to a specific user without going through permissions

Code: [Select]
{.if|{.!=|%user%|Tsuna.}|{:{.redirect|../ .}:}.}

note the difference in use between  {.!=|    and  {.=|  , difference or equal usage