mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
* embargo: add support for per-collection date range embargo with embargo options of 'before', 'after', 'newer' and 'older' 'before' and 'after' accept a timestamp 'newer' and 'older' options configured with a dictionary consisting of any combo of 'years', 'months', 'days' add basic test for each embargo option * acl/embargo work: - support acl access value 'allow_ignore_embargo' for overriding embargo - support 'user' in acl setting, matched with value of 'X-Pywb-ACL-User' header - support passing through 'X-Pywb-ACL-User' setting to warcserver - aclmanager: support -u/--user param for adding, removing and matching rules - tests: add test for 'allow_ignore_embargo', user-specific acl rule matching * docs: add docs for new embargo system! * docs: add info on how to configure ACL header with short examples to usage page. sample-deploy: add examples of configuring X-pywb-ACL-user header based on IP for nginx and apache sample deployments * docs: fix access control page header, text tweaks * bump version to 2.6.0b0
39 lines
778 B
Plaintext
39 lines
778 B
Plaintext
# nginx config for running under /wayback/ prefix
|
|
|
|
|
|
# set acl_user, defaulting to empty (any public user)
|
|
geo $acl_user {
|
|
# ensure user is set to empty by default
|
|
default "";
|
|
|
|
# optional: add IP ranges to allow privileged access
|
|
127.0.0.1 "staff";
|
|
192.168.0.0/24 "staff";
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
listen 80;
|
|
|
|
# optinal: optimization to have nginx serve static assets
|
|
location /wayback/static {
|
|
alias /pywb/pywb/static;
|
|
}
|
|
|
|
# required: pywb with prefix
|
|
location /wayback/ {
|
|
resolver 127.0.0.1;
|
|
|
|
uwsgi_pass pywb:8081;
|
|
|
|
|
|
include uwsgi_params;
|
|
uwsgi_param UWSGI_SCHEME $scheme;
|
|
|
|
# pass acl_user (which should be empty by default)
|
|
uwsgi_param HTTP_X_PYWB_ACL_USER $acl_user;
|
|
}
|
|
}
|
|
|