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!
-
J joseph moved this topic from Support on
-
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. -
With the latest package, you can add env vars in /app/data/env.sh . So, try
export SAFE_PROTOCOL_REGEX='^(?:source:)?https?://'for example (export keyword needed!) -
With the latest package, you can add env vars in /app/data/env.sh . So, try
export SAFE_PROTOCOL_REGEX='^(?:source:)?https?://'for example (export keyword needed!) -
Ah ok, not sure then . I guess you have to debug the app if you are up for it. Place the app in repair mode and edit the code to find out why it's not working...
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login