Skip to content

Commit 37fff9f

Browse files
committed
undo
1 parent a50bc08 commit 37fff9f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/routes.ts

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

33
export function generateRoutesConfig(routes: Route[]): string {
4-
// return routes.map(route => `
5-
// location = ${route.path} {
6-
// if ($request_method = ${route.method}) {
7-
// proxy_pass http://${route.target};
8-
// }
9-
// }`).join('');
104
return routes.map(route => `
11-
location ${route.path} {
5+
location = ${route.path} {
6+
if ($request_method = ${route.method}) {
127
proxy_pass http://${route.target};
13-
}`).join('');
14-
}
8+
}
9+
}`).join('');
10+
// return routes.map(route => `
11+
// location ${route.path} {
12+
// proxy_pass http://${route.target};
13+
// }`).join('');
14+
}

0 commit comments

Comments
 (0)