Skip to content

Error 403 "forbidden" when running 'next dev' through stunnel - Next.js ver. 15.2.2 #77045

Open
@designly1

Description

@designly1

Link to the code that reproduces this issue

https://github.com/designly1/nextjs-15-2-2-stunnel-issue

To Reproduce

1 . Clone repo
2. cd repo
3. pnpm i
4. Setup a stunnnel reverse proxy:

[dev server]
accept = 443
connect = 3000
cert = /path/to/cert.pem
key = /path/to/key.pem
  1. Run the dev server pnpm dev
  2. Connect via valid SSL domain name
  3. Check dev tools console

Current vs. Expected behavior

Expect no errors but get 403 forbidden errors loading resources from /_next

Image

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.3.0: Thu Jan  2 20:23:36 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T8112
  Available memory (MB): 24576
  Available CPU cores: 8
Binaries:
  Node: 20.18.3
  npm: 11.1.0
  Yarn: 1.22.22
  pnpm: 10.5.2
Relevant Packages:
  next: 15.2.2 // Latest available version is detected (15.2.2).
  eslint-config-next: 15.2.2
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.8.2
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Turbopack, CSS, Font (next/font), Instrumentation, Runtime

Which stage(s) are affected? (Select all that apply)

next dev (local)

Additional context

I tested against different canary versions. Issue was introduced in v15.2.2-canary.3. Reverting to v15.2.2-canary.2 fixes the problem. I also tried running next dev without --turbopack and that did not fix the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CSSRelated to CSS.Font (next/font)Related to Next.js Font Optimization.InstrumentationRelated to Next.js Instrumentation.RuntimeRelated to Node.js or Edge Runtime with Next.js.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions