From 46e0f94ff802dd56f96c188d9f7f4b604a3d7be0 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 2 Dec 2024 21:02:37 +0200 Subject: [PATCH] twittermeow: add default referer and origin --- pkg/twittermeow/headers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/twittermeow/headers.go b/pkg/twittermeow/headers.go index 4ff9c5b..9f97d01 100644 --- a/pkg/twittermeow/headers.go +++ b/pkg/twittermeow/headers.go @@ -4,6 +4,7 @@ import ( "net/http" "go.mau.fi/mautrix-twitter/pkg/twittermeow/cookies" + "go.mau.fi/mautrix-twitter/pkg/twittermeow/data/endpoints" ) const BrowserName = "Chrome" @@ -29,6 +30,8 @@ var BaseHeaders = http.Header{ "sec-ch-ua": []string{SecCHUserAgent}, "sec-ch-ua-platform": []string{SecCHPlatform}, "sec-ch-ua-mobile": []string{SecCHMobile}, + "referer": []string{endpoints.BASE_URL + "/"}, + "origin": []string{endpoints.BASE_URL}, //"sec-ch-prefers-color-scheme": []string{SecCHPrefersColorScheme}, //"sec-ch-ua-full-version-list": []string{SecCHFullVersionList}, //"sec-ch-ua-model": []string{SecCHModel},