summaryrefslogtreecommitdiff
path: root/scripts
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
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')
-rwxr-xr-xscripts/fill.image_urls.py8
-rwxr-xr-xscripts/writer.py4
2 files changed, 6 insertions, 6 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:]
diff --git a/scripts/writer.py b/scripts/writer.py
index cf4690c..be3cc05 100755
--- a/scripts/writer.py
+++ b/scripts/writer.py
@@ -30,8 +30,8 @@ HtmlTemplate = """
<html>
<head>
<title>%s</title>
-<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
-<script type="text/javascript" src="http://dump.fm/static/js/jquery.flot.js"></script>
+<script type="text/javascript" src="/static/js/jquery-1.4.2.min.js?v=20260126"></script>
+<script type="text/javascript" src="/static/js/jquery.flot.js"></script>
<style>
table {
margin: 0;