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
  • Brite
  • 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 - Status | 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
7 Posts 3 Posters 1.5k 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 on 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 on
    • BrutalBirdieB Offline
      BrutalBirdieB Offline
      BrutalBirdie
      Partner
      wrote on 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 on last edited by
        #3

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

        1 Reply Last reply
        0
        • BrutalBirdieB Offline
          BrutalBirdieB Offline
          BrutalBirdie
          Partner
          wrote on 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 Do not disturb
            girishG Do not disturb
            girish
            Staff
            wrote on 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!)

            M 1 Reply Last reply
            1
            • girishG girish

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

              M Offline
              M Offline
              macone
              wrote on last edited by
              #6

              @girish Not working, I am getting: Invalid or unsupported URL

              1 Reply Last reply
              0
              • girishG Do not disturb
                girishG Do not disturb
                girish
                Staff
                wrote on last edited by
                #7

                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...

                1 Reply Last reply
                0

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