2014-01-29 00:03:24 -08:00
|
|
|
# pywb config file
|
|
|
|
# ========================================
|
|
|
|
#
|
2021-08-31 21:17:01 -07:00
|
|
|
debug: true
|
2022-07-28 02:29:18 -04:00
|
|
|
|
|
|
|
# Uncomment to set banner colors and logo
|
|
|
|
# ui:
|
|
|
|
# logo: path/relative/from/static/logo.png
|
2023-01-05 17:33:00 -05:00
|
|
|
# logo_home_url: https://example.com
|
2022-07-28 02:29:18 -04:00
|
|
|
# navbar_background_hex: 0c49b0
|
|
|
|
# navbar_color_hex: fff
|
|
|
|
# navbar_light_buttons: true
|
2023-03-27 10:23:37 -04:00
|
|
|
# disable_printing: true
|
JS Object Proxy Override System (#224)
* Init commit for Wombat JS Proxies off of https://github.com/ikreymer/pywb/tree/develop
Changes
- cli.py: add import os for os.chdir(self.r.directory)
- frontendapp.py: added initial support for cors requests.
- static_handler.py: add import for NotFoundException
- wbrequestresponse.py: added the intital implementation for cors requests, webrecoder needs this for recording!
- default_rewriter.py: added JSWombatProxyRewriter to default js rewriter class for internal testing
- html_rewriter.py: made JSWombatProxyRewriter to be default js rewriter class for internal testing
- regex_rewriters.py: implemented JSWombatProxyRewriter and JSWombatProxyRewriter to support wombat JS Proxy
- wombat.js: added JS Proxy support
- remove print
* wombat proxy: simplify mixin using 'first_buff'
* js local scope rewrite/proxy work:
- add DefaultHandlerWithJSProxy to enable new proxy rewrite (disabled by default)
- new proxy toggleable with 'js_local_scope_rewrite: true'
- work on integrating john's proxy work
- getAllOwnProps() to generate list of functions that need to be rebound
- remove non-proxy related changes for now, remove angular special cases (for now)
* local scope proxy work:
- add back __WB_pmw() prefix for postMessage
- don't override postMessage() in proxy obj
- MessageEvent resolve proxy to original window obj
* js obj proxy: use local_init() to load local vars from proxy obj
* wombat: js object proxy improvements:
- use same object '_WB_wombat_obj_proxy' on window and document objects
- reuse default_proxy_get() for get operation from window or document
- resolve and Window/Document object to the proxy, eg. if '_WB_wombat_obj_proxy' exists, return that
- override MessageEvent.source to return window proxy object
* obj proxy work:
- window proxy: defineProperty() override calls Reflect.defineProperty on dummy object as well as window to avoid exception
- window proxy: set() also sets on dummy object, and returns false if Reflect.set returns false (eg. altered by Reflect.defineProperty disabled writing)
- add override_prop_to_proxy() to add override to return proxy obj for attribute
- add override for Node.ownerDocument and HTMLElement.parentNode to return document proxy
server side rewrite: generalize local proxy insert, add list for local let overrides
* js obj proxy work:
- add default '__WB_pmw' to self if undefined (for service workers)
- document.origin override
- proxy obj: improved defineProperty override to work with safari
- proxy obj: catch any exception in dummy obj setter
* client-side rewriting:
- proxy obj: catch exception (such as cross-domain access) in own props init
- proxy obj: check for self reference '_WB_wombat_obj_proxy' access to avoid infinite recurse
- rewrite style: add 'cursor' attr for css url rewriting
* content rewriter: if is_ajax(), skip JS proxy obj rewriting also (html rewrite also skipped)
* client-side rewrite: rewrite 'data:text/css' as inline stylesheet when set via setAttribute() on 'href' in link
* client-side document override improvements:
- fix document.domain, document.referrer, forms add document.origin overrides to use only the document object
- init_doc_overrides() called as part of proxy init
- move non-document overrides to main init
rewrite: add rewrite for "Function('return this')" pattern to use proxy obj
* js obj proxy: now a per-collection (and even a per-request) setting 'use_js_obj_prox' (defaults to False)
live-rewrite-server: defaults to enabled js obj proxy
metadata: get_metadata() loads metadata.yaml for config settings for dynamic collections),
or collection config for static collections
warcserver: get_coll_config() returns config for static collection
tests: use custom test dir instead of default 'collections' dir
tests: add basic test for js obj proxy
update to warcio>=1.4.0
* karma tests: update to safari >10
* client-side rewrite:
- ensure wombat.js is ES5 compatible (don't use let)
- check if Proxy obj exists before attempting to init
* js proxy obj: RewriteWithProxyObj uses user-agent to determine if Proxy obj can be supported
content_rewriter: add overridable get_rewriter()
content_rewriter: fix elif -> if in should_rw_content()
tests: update js proxy obj test with different user agents (supported and unsupported)
karma: reset test to safari 9
* compatibility: remove shorthand notation from wombat.js
* js obj proxy: override MutationObserver.observe() to retrieve original object from proxy
wombat.js: cleanup, remove commented out code, label new proxy system functions, bump version to 2.40
2017-08-05 10:37:32 -07:00
|
|
|
|
2014-02-03 09:24:40 -08:00
|
|
|
collections:
|
2017-10-23 15:33:23 -07:00
|
|
|
all: $all
|
2017-10-03 15:31:08 -07:00
|
|
|
pywb:
|
2017-10-18 10:39:18 -07:00
|
|
|
index_paths: ./sample_archive/cdx/
|
|
|
|
archive_paths: ./sample_archive/warcs/
|
2014-02-07 19:32:58 -08:00
|
|
|
|
2017-10-03 15:31:08 -07:00
|
|
|
# Settings for each collection
|
|
|
|
use_js_obj_proxy: true
|
2014-02-19 20:20:31 -08:00
|
|
|
|
2022-07-28 02:29:18 -04:00
|
|
|
# Eanable Memento support
|
2014-03-14 10:46:20 -07:00
|
|
|
enable_memento: true
|
2014-03-17 13:17:02 -07:00
|
|
|
|
2014-06-14 18:26:19 -07:00
|
|
|
# Replay content in an iframe
|
|
|
|
framed_replay: true
|
2014-07-26 13:24:53 -07:00
|
|
|
|
2021-08-31 21:17:01 -07:00
|
|
|
redirect_to_exact: true
|
|
|
|
|
2022-07-28 02:29:18 -04:00
|
|
|
# Uncomment and change to set default locale
|
2021-06-24 11:28:48 -07:00
|
|
|
# default_locale: en
|
|
|
|
|
2022-07-28 02:29:18 -04:00
|
|
|
# Uncomment to set available locales
|
|
|
|
# locales:
|
|
|
|
# - en
|
|
|
|
# - ru
|