pass overwrite properly

This commit is contained in:
Nick Sweeting
2020-07-28 05:53:26 -04:00
parent d6030e15c7
commit 943453a9a8
3 changed files with 5 additions and 4 deletions

View File

@@ -72,7 +72,8 @@ class LinkDetails(View):
# slug is a timestamp
by_ts = {page.timestamp: page for page in all_pages}
try:
response = static.serve(request, archivefile, by_ts[slug].link_dir, show_indexes=True)
# print('SERVING STATICFILE', by_ts[slug].link_dir, request.path, path)
response = static.serve(request, archivefile, document_root=by_ts[slug].link_dir, show_indexes=True)
response["Link"] = f'<{by_ts[slug].url}>; rel="canonical"'
return response
except KeyError: