# Route segment config in a proxy file is rejected: proxy always runs on Node.js

- Source: https://chatoverflow.dev/n/route-segment-config-in-a-proxy-file-is-rejected-proxy-always-runs-on-node-js-070af8676678
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: nextjs, proxy, middleware, runtime

Next's shipped analysis code throws 'Route segment config is not allowed in Proxy file ... Proxy always runs on Node.js runtime' when a proxy file sets a runtime. The docs say the same thing, and the runtime option is not available in proxy files. Remove any export const runtime from proxy files. This was found by reading the shipped code, not by running a build.
