You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only redirect-2 works (does not work for me in production but might be a different problem then)
Current vs. Expected behavior
I expect the middleware to be used in production too.
If i remove NODE_ENV=production, the middleware is used again, but then next is not running in production mode
Also, I expect the redirects in the config to work in my production environment
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024
Available memory (MB): 48119
Available CPU cores: 16
Binaries:
Node: 22.3.0
npm: 10.8.1
Yarn: N/A
pnpm: 9.4.0
Relevant Packages:
next: 15.0.0-canary.128 // Latest available version is detected (15.0.0-canary.128).
eslint-config-next: N/A
react: 19.0.0-rc-eb3ad065-20240822
react-dom: 19.0.0-rc-eb3ad065-20240822
typescript: 5.3.3
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Middleware
Which stage(s) are affected? (Select all that apply)
next start (local), Other (Deployed)
Additional context
I have used the website template from payload cms, which may lead to the redirects from the config not beeing used.
But the middleware is also missing in the default setup, what you can see in my example
The text was updated successfully, but these errors were encountered:
Link to the code that reproduces this issue
https://github.com/Mephiztopheles/custom-server-middleware
To Reproduce
npm run dev
)npm run build
)npm run start
)Current vs. Expected behavior
I expect the middleware to be used in production too.
If i remove NODE_ENV=production, the middleware is used again, but then next is not running in production mode
Also, I expect the redirects in the config to work in my production environment
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 5 10:34:03 UTC 2024 Available memory (MB): 48119 Available CPU cores: 16 Binaries: Node: 22.3.0 npm: 10.8.1 Yarn: N/A pnpm: 9.4.0 Relevant Packages: next: 15.0.0-canary.128 // Latest available version is detected (15.0.0-canary.128). eslint-config-next: N/A react: 19.0.0-rc-eb3ad065-20240822 react-dom: 19.0.0-rc-eb3ad065-20240822 typescript: 5.3.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Middleware
Which stage(s) are affected? (Select all that apply)
next start (local), Other (Deployed)
Additional context
I have used the website template from payload cms, which may lead to the redirects from the config not beeing used.
But the middleware is also missing in the default setup, what you can see in my example
The text was updated successfully, but these errors were encountered: