Ignore:
Timestamp:
Jan 18, 2017, 11:15:04 PM (8 years ago)
Author:
rick
Message:

Captive portal pages not NOT be cached by browser.

The URL of the page does not represent the actual content of the page
requested, yet every attempt of re-using the content should be avoided.

Location:
branches/releng-11/nanobsd/files/usr/local/www/portal
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/releng-11/nanobsd/files/usr/local/www/portal/index.cgi

    r13737 r13739  
    2323else
    2424  echo 'Content-Type: text/html'
     25  echo 'Cache-Control: no-cache, no-store, must-revalidate'
     26  echo 'Pragma: no-cache'
     27  echo 'Expires: 0'
    2528  echo ''
    2629  # User is new, present welcome page
  • branches/releng-11/nanobsd/files/usr/local/www/portal/login/index.cgi

    r13738 r13739  
    2323# Redirect to proper page
    2424echo 'Content-Type: text/html'
     25echo 'Cache-Control: no-cache, no-store, must-revalidate'
     26echo 'Pragma: no-cache'
     27echo 'Expires: 0'
    2528echo 'Refresh: 1; url=http://www.wirelessleiden.nl'
    2629echo ''
  • branches/releng-11/nanobsd/files/usr/local/www/portal/logout/index.cgi

    r13372 r13739  
    1010REMOTE_MAC=`arp -n $REMOTE_ADDR | awk '{print $4}'`
    1111
    12 # Add entry to authorized list
     12# Delete entry from authorized list
    1313sudo pfctl -q -t wlportal -T delete $REMOTE_ADDR
     14
     15# Delete mac from authorized list
     16grep -v $REMOTE_MAC $DB >> $DB.new
     17mv $DB.new $DB
    1418
    1519# Redirect to proper page
    1620echo 'Content-Type: text/html'
     21echo 'Cache-Control: no-cache, no-store, must-revalidate'
     22echo 'Pragma: no-cache'
     23echo 'Expires: 0'
    1724echo 'Refresh: 60; url=/portal/login'
    1825echo ''
Note: See TracChangeset for help on using the changeset viewer.