We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bad8796 commit 4eb84c4Copy full SHA for 4eb84c4
app/routes/home.tsx
@@ -40,7 +40,12 @@ export async function action({ request }: Route.ActionArgs) {
40
}
41
42
// Build absolute URL to API using current request URL as base
43
- const apiUrl = new URL("/api/archive/", request.url);
+ const apiUrl = new URL("/api/archive", request.url);
44
+
45
+ // Ensure HTTPS in production to avoid reverse proxy POST->GET conversion
46
+ if (process.env.NODE_ENV === "production") {
47
+ apiUrl.protocol = "https:";
48
+ }
49
50
try {
51
const res = await fetch(apiUrl, {
0 commit comments