Skip to content

Using https with singleFetch causing error "Headers.set: ":method" is an invalid header name" #10445

Open
@anhdd-kuro

Description

Reproduction

What evert I use ( vite-plugin-mkcert, mkcert ... ) , the same error occur
Here is config files

import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import mkcert from "vite-plugin-mkcert";

export default defineConfig({
  plugins: [
    remix({
      ignoredRouteFiles: ["**/.*"],
      future: {
        v3_relativeSplatPath: true,
      },
    }),
    mkcert(),
  ],
  server: {
    port: Number(process.env.PORT || 3000),
  },
  ssr: {
  },
  build: {
    assetsInlineLimit: 0,
  },
});

or

import { vitePlugin as remix } from "@remix-run/dev";
import { defineConfig } from "vite";
import { createCA, createCert } from "mkcert";

const ca = await createCA({
  organization: "company",
  countryCode: "JP",
  state: "state",
  locality: "locality",
  validity: 365,
});

const cert = await createCert({
  ca,
  domains: ["127.0.0.1", "localhost"],
  validity: 365,
});

declare module "@remix-run/server-runtime" {
  interface Future {
    v3_singleFetch: true;
  }
}

export default defineConfig({
  plugins: [
    remix({
      ignoredRouteFiles: ["**/.*"],
      future: {
        v3_relativeSplatPath: true,
        v3_singleFetch: true,
      },
    }),
  ],
  server: {
    port: Number(process.env.PORT || 3456),
    // https://remix.run/docs/en/main/guides/local-tls
    https: cert,
  },
  build: {
    assetsInlineLimit: 0,
  },
});

System Info

"vite": "6.0.11",
"@remix-run/node": "2.15.2"

Used Package Manager

pnpm

Expected Behavior

Run normally

Actual Behavior

[vite] Internal server error: Headers.set: ":method" is an invalid header name.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions