Skip to content

Commit a50bc08

Browse files
committed
test - delete method
1 parent ccb99a2 commit a50bc08

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/routes.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +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('');
410
return routes.map(route => `
5-
location = ${route.path} {
6-
if ($request_method = ${route.method}) {
11+
location ${route.path} {
712
proxy_pass http://${route.target};
8-
}
9-
}`).join('');
10-
}
13+
}`).join('');
14+
}

0 commit comments

Comments
 (0)