diff --git a/changedetectionio/fetch_site_status.py b/changedetectionio/fetch_site_status.py index 4a162f3d..128a4e1d 100644 --- a/changedetectionio/fetch_site_status.py +++ b/changedetectionio/fetch_site_status.py @@ -4,8 +4,7 @@ import os import re import urllib3 import difflib -import requests -import json + from changedetectionio import content_fetcher, html_tools @@ -59,19 +58,6 @@ class perform_site_check(): # Tweak the base config with the per-watch ones request_headers = self.datastore.data['settings']['headers'].copy() - - if self.datastore.data['watching'][uuid].get('external_header_server') is not None and self.datastore.data['watching'][uuid].get('external_header_server') != "" and self.datastore.data['watching'][uuid].get('external_header_server') != "None": - try: - resp = requests.get(self.datastore.data['watching'][uuid].get('external_header_server')) - if resp.status_code != 200: - raise Exception("External header server returned non-200 response. Please check the URL for the server") - - data = json.loads(resp.text.strip()) - request_headers.update(resp.json()) - - except json.decoder.JSONDecodeError: - raise Exception("Failed to decode JSON response from external header server") - request_headers.update(extra_headers) # https://github.com/psf/requests/issues/4525 diff --git a/changedetectionio/forms.py b/changedetectionio/forms.py index a277a73f..84d164d6 100644 --- a/changedetectionio/forms.py +++ b/changedetectionio/forms.py @@ -370,7 +370,6 @@ class watchForm(commonSettingsForm): title = StringField('Title', default='') ignore_text = StringListField('Ignore text', [ValidateListRegex()]) - external_header_server = fields.URLField('External Header Server', validators=[validators.Optional(), validateURL()]) headers = StringDictKeyValue('Request headers') body = TextAreaField('Request body', [validators.Optional()]) method = SelectField('Request method', choices=valid_method, default=default_method) diff --git a/changedetectionio/model/Watch.py b/changedetectionio/model/Watch.py index 4988786b..53cc9e73 100644 --- a/changedetectionio/model/Watch.py +++ b/changedetectionio/model/Watch.py @@ -26,7 +26,6 @@ class model(dict): 'previous_md5': False, 'uuid': str(uuid.uuid4()), 'headers': {}, # Extra headers to send - 'external_header_server': None, # URL to a server that will return headers 'body': None, 'method': 'GET', #'history': {}, # Dict of timestamp and output stripped filename diff --git a/changedetectionio/templates/edit.html b/changedetectionio/templates/edit.html index 1cca5ef0..fd3758d9 100644 --- a/changedetectionio/templates/edit.html +++ b/changedetectionio/templates/edit.html @@ -120,12 +120,6 @@