We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4f779da + 54f0ee0 commit 153dba4Copy full SHA for 153dba4
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