We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f779da commit 54f0ee0Copy full SHA for 54f0ee0
2 files changed
src/Servers/NginxServer/echo.js
@@ -7,4 +7,12 @@ function echo(r) {
7
r.return(200, body);
8
}
9
10
-export default { echo };
+function handler(r) {
11
+ if (r.method === 'POST') {
12
+ r.return(200, r.requestText || '');
13
+ } else {
14
+ r.return(200, 'OK');
15
+ }
16
+}
17
+
18
+export default { echo, handler };
src/Servers/NginxServer/nginx.conf
@@ -27,7 +27,7 @@ http {
27
28
29
location / {
30
- return 200 "OK";
+ js_content echo.handler;
31
32
33
0 commit comments