Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Change Detection
  3. Support for source: URL prefixes in the API

Support for source: URL prefixes in the API

Scheduled Pinned Locked Moved Change Detection
5 Posts 3 Posters 35 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      M Offline
      macone
      wrote last edited by
      #1

      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!

      1 Reply Last reply
      1
      • J joseph moved this topic from Support
      • BrutalBirdieB Online
        BrutalBirdieB Online
        BrutalBirdie
        Partner
        wrote last edited by
        #2

        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.

        Like my work? Consider donating a drink. Cheers!

        1 Reply Last reply
        0
        • M Offline
          M Offline
          macone
          wrote last edited by
          #3

          start.sh is unwritable and /app/data/.env seems not working

          1 Reply Last reply
          0
          • BrutalBirdieB Online
            BrutalBirdieB Online
            BrutalBirdie
            Partner
            wrote last edited by
            #4

            Oh, okay?
            I will have to reproduce the issue and look for the fix then.

            Like my work? Consider donating a drink. Cheers!

            1 Reply Last reply
            0
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote last edited by
              #5

              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!)

              1 Reply Last reply
              1
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Bookmarks
                • Search