RSS allow access via token (#310)
Allow access via a token * New RSS URL * Redirect the old RSS feed URL * fix tests
This commit is contained in:
@@ -49,7 +49,7 @@ class ChangeDetectionStore:
|
||||
# Custom notification content
|
||||
'notification_title': None,
|
||||
'notification_body': None,
|
||||
'notification_format': None,
|
||||
'notification_format': None
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -147,6 +147,12 @@ class ChangeDetectionStore:
|
||||
else:
|
||||
self.__data['app_guid'] = str(uuid_builder.uuid4())
|
||||
|
||||
# Generate the URL access token for RSS feeds
|
||||
if not 'rss_access_token' in self.__data['settings']['application']:
|
||||
import secrets
|
||||
secret = secrets.token_hex(16)
|
||||
self.__data['settings']['application']['rss_access_token'] = secret
|
||||
|
||||
self.needs_write = True
|
||||
|
||||
# Finally start the thread that will manage periodic data saves to JSON
|
||||
|
||||
Reference in New Issue
Block a user