webrecorder / pywb

Core Python Web Archiving Toolkit for replay and recording of web archives
https://pypi.python.org/pypi/pywb
GNU General Public License v3.0
1.37k stars 214 forks source link

wbrequest object not available in not_found.html template #833

Open despens opened 1 year ago

despens commented 1 year ago

pywb documentation claims that the wbrequest object is available for the not_found.html template. However, wbrequest is not available when a not found error occurs during non-proxy replay.

In a way it makes sense because the template being displayed is probably not the result of a web archive request. But it would be great to have the object available for the request that originally failed so users could be recommended to go to other places in the collection. However the template won't know about which collection the user was browsing or what the collection's base URL is etc unless the webrequest object would be made available.

Steps to reproduce the bug

Expected behavior

The contents of the wbrequest object should be rendered.

Environment