Support for source: URL prefixes in the API
-
Hi,
I have changedetection.io installed via Cloudron, and I'm trying to enable support for source: URL prefixes in the API.According to the documentation, I need to set the environment variable:
SAFE_PROTOCOL_REGEX=^(?:source:)?https?://
I tried adding this to /app/data/.env and also to start.sh using export SAFE_PROTOCOL_REGEX=..., but the API still responds with:
400 - "Invalid or unsupported URL"
Interestingly, the source: prefix works just fine via the web UI – only API calls are rejected.
What is the correct way to set this environment variable so that the Python backend of the app actually picks it up in Cloudron?
Thanks in advance!
-
-
From https://github.com/search?q=repo%3Adgtlmoon%2Fchangedetection.io SAFE_PROTOCOL_REGEX&type=code
SAFE_PROTOCOL_REGEX='^(http|https|ftp|file):'
the important part here might be the
'
RegEx'
.
Please check if putting'
around your RegEx like so:SAFE_PROTOCOL_REGEX='^(?:source:)?https?://'
solves the issue.
-
Oh, okay?
I will have to reproduce the issue and look for the fix then.