From 2fd3dea9e645f7692fd7637a5b9288f4fd7bdc0a Mon Sep 17 00:00:00 2001 From: Paracosm-Daemon Date: Wed, 7 Aug 2024 01:14:23 -0700 Subject: [PATCH] Fix Lune cookie auth --- .lune/build.luau | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.lune/build.luau b/.lune/build.luau index 134b229..f3ef7e8 100644 --- a/.lune/build.luau +++ b/.lune/build.luau @@ -6,10 +6,11 @@ local Net = require("@lune/net") local APPLICATION_JSON: string = "application/json" local USER_AGENT: string = "Roblox/WinInet" +local LUNE_AUTH: string = assert(Process.env.LUNE_AUTH, "Need LUNE_AUTH env to publish Weaver") local PUBLISH_TO: string = "18772004646" -- Variables local Asset: string = Filesystem.readFile("Weaver.rbxm") -local Cookie: string = assert(Process.env.LUNE_AUTH, "Need LUNE_AUTH env to publish Weaver") +local Cookie: string = `.ROBLOSECURITY={ LUNE_AUTH }` local CSRF_Headers: { [string]: any } = { @@ -32,6 +33,7 @@ local CSRF_Token: string | { string } = assert(CSRF_Response.headers["x-csrf-tok local Upload_Headers: { [string]: any } = { ["Content-Type"] = "application/octet-stream"; + ["X-CSRF-Token"] = CSRF_Token; ["User-Agent"] = USER_AGENT;