summaryrefslogtreecommitdiff
path: root/scripts/fill.image_urls.py
diff options
context:
space:
mode:
authoryo momma <shutup@oops.wtf>2026-01-27 03:33:16 +0000
committeryo momma <shutup@oops.wtf>2026-01-27 03:33:16 +0000
commitfc9a4ea22eb91757b95cbe1bf1708be17fc2337a (patch)
tree76a0122149e3288ee21d7fb6d0410b1b7b8970a4 /scripts/fill.image_urls.py
parent25b74138d68ade87689e714f10e1f3116da5bbee (diff)
Fix HTTPS/mixed content; make config env-drivenHEADmaster2026
- Replace hardcoded dump.fm URLs with host/scheme config\n- Add optional passwordless login flow\n- Update templates/static assets to avoid blocked HTTP resources\n- Ignore local uploads/SQL dumps
Diffstat (limited to 'scripts/fill.image_urls.py')
-rwxr-xr-xscripts/fill.image_urls.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/fill.image_urls.py b/scripts/fill.image_urls.py
index 4f7c2ea..b7e0f2e 100755
--- a/scripts/fill.image_urls.py
+++ b/scripts/fill.image_urls.py
@@ -58,16 +58,16 @@ def get_urls_from_messages(messages):
return urls
# this does 3 things...
-# convert 'http://dumpfm.s3.amazonaws.com' to 'http://dump.fm'
+# convert 'http://dumpfm.s3.amazonaws.com' to '/'
# drops 'http://' from urls
# drops 'dump.fm/images' from urls
# the client is expected to rebuild urls based on this heuristic:
-# if the url starts with '/', prepend 'http://dump.fm'
+# if the url starts with '/', prepend '/'
# otherwise, prepend 'http://'
def make_url_smaller(url):
if url[:37] == 'http://dumpfm.s3.amazonaws.com/images':
- url = 'http://dump.fm/images' + url[37:]
- if url[:21] == 'http://dump.fm/images':
+ url = '/images' + url[37:]
+ if url[:21] == '/images':
url = url[21:]
else:
url = url[7:]