Skip to content

Instantly share code, notes, and snippets.

@eby
Last active February 21, 2020 19:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eby/5dca1c51b2125a4ace822494fe59cd65 to your computer and use it in GitHub Desktop.
Save eby/5dca1c51b2125a4ace822494fe59cd65 to your computer and use it in GitHub Desktop.
Evergreen Selfcheck Login for Nginx
# Presumes workstations have been created
# Set the homepage of the kiosk browser to selfchecks.mylibrary.org/location
server {
listen 443 ssl http2;
server_name selfchecks.mylibrary.org;
include shared/ssl.conf;
location /branch1 {
allow 192.168.1.0/24;
deny all;
add_header Set-Cookie "username=bself1;Domain=mylibrary.org;Path=/";
add_header Set-Cookie "password=bselfpass1;Domain=mylibrary.org;Path=/";
add_header Set-Cookie "ws=BR1-self;Domain=mylibrary.org;Path=/";
return 301 https://evergreen.mylibrary.org/eg/circ/selfcheck/main;
}
location /branch2 {
allow 192.168.2.0/24;
deny all;
add_header Set-Cookie "username=bself2;Domain=mylibrary.org;Path=/";
add_header Set-Cookie "password=bselfpass2;Domain=mylibrary.org;Path=/";
add_header Set-Cookie "ws=BR2-self;Domain=mylibrary.org;Path=/";
return 301 https://evergreen.mylibrary.org/eg/circ/selfcheck/main;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment