Skip to content

Commit 55d6f01

Browse files
committed
nginx: [emerg] proxy_set_header directive is not allowed here in /etc/nginx/sites-enabled/9004:16
1 parent 84d222c commit 55d6f01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/routes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import type { Route } from './type';
22

33
export function generateRoutesConfig(routes: Route[]): string {
44
return routes.map(route => `
5-
location ${route.path} {
5+
location = ${route.path} {
66
if ($request_method = ${route.method}) {
7-
proxy_set_header Host $host;
87
proxy_pass http://${route.target};
98
proxy_http_version 1.1;
9+
proxy_set_header Host $host;
1010
proxy_set_header Upgrade $http_upgrade;
1111
proxy_set_header Connection "upgrade";
1212
}

0 commit comments

Comments
 (0)