From ec4b1664cb8881b34d59bbf1d36572ae27b77374 Mon Sep 17 00:00:00 2001 From: cka-y Date: Tue, 7 Jul 2026 15:42:21 -0400 Subject: [PATCH 1/2] fix: missing headers for feeds mdb-3237 to mdb-3293 and mdb-2939 --- liquibase/changelog.xml | 2 ++ liquibase/changes/hotfix_missing_header.sql | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 liquibase/changes/hotfix_missing_header.sql diff --git a/liquibase/changelog.xml b/liquibase/changelog.xml index 4175becac..13822937d 100644 --- a/liquibase/changelog.xml +++ b/liquibase/changelog.xml @@ -117,6 +117,8 @@ + + diff --git a/liquibase/changes/hotfix_missing_header.sql b/liquibase/changes/hotfix_missing_header.sql new file mode 100644 index 000000000..cd0ea83d3 --- /dev/null +++ b/liquibase/changes/hotfix_missing_header.sql @@ -0,0 +1,17 @@ +-- Add a custom User-Agent/Referer header override for feeds mdb-3237 through mdb-3293, and mdb-2939, +-- whose producer blocks the default download headers. +INSERT INTO config_value_feed (feed_id, feed_stable_id, namespace, key, value, updated_at) +SELECT + f.id, + f.stable_id, + 'feed_download', + 'http_headers', + '{"Accept": "*/*", "Referer": "https://opendata.samtrafiken.se/gtfs/vastexp/vastexp.zip", "User-Agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36", "Accept-Encoding": "gzip"}'::jsonb, + now() +FROM feed f +WHERE f.stable_id IN ( + SELECT 'mdb-' || generate_series(3237, 3293) + UNION ALL + SELECT 'mdb-2939' +) +ON CONFLICT (feed_id, namespace, key) DO NOTHING; From 05bfd5636c0f153f48ce41d4c32b5343a806b6f9 Mon Sep 17 00:00:00 2001 From: cka-y Date: Tue, 7 Jul 2026 16:14:16 -0400 Subject: [PATCH 2/2] fix: removed referer --- liquibase/changes/hotfix_missing_header.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liquibase/changes/hotfix_missing_header.sql b/liquibase/changes/hotfix_missing_header.sql index cd0ea83d3..4878d27d5 100644 --- a/liquibase/changes/hotfix_missing_header.sql +++ b/liquibase/changes/hotfix_missing_header.sql @@ -6,7 +6,7 @@ SELECT f.stable_id, 'feed_download', 'http_headers', - '{"Accept": "*/*", "Referer": "https://opendata.samtrafiken.se/gtfs/vastexp/vastexp.zip", "User-Agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36", "Accept-Encoding": "gzip"}'::jsonb, + '{"Accept": "*/*", "User-Agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36", "Accept-Encoding": "gzip"}'::jsonb, now() FROM feed f WHERE f.stable_id IN (