Fetcher - Ability to specify headers from a textfile per watch, global or per tag ( https://github.com/dgtlmoon/changedetection.io/wiki/Adding-headers-from-an-external-file )

This commit is contained in:
dgtlmoon
2023-05-22 17:19:52 +02:00
committed by GitHub
parent 955835df72
commit 9e954532d6
8 changed files with 160 additions and 14 deletions

View File

@@ -70,10 +70,9 @@ class perform_site_check(difference_detection_processor):
# Unset any existing notification error
update_obj = {'last_notification_error': False, 'last_error': False}
extra_headers = watch.get('headers', [])
# Tweak the base config with the per-watch ones
request_headers = deepcopy(self.datastore.data['settings']['headers'])
extra_headers = watch.get_all_headers()
request_headers = self.datastore.get_all_headers()
request_headers.update(extra_headers)
# https://github.com/psf/requests/issues/4525