Skip to content

Commit 0debca9

Browse files
committed
chore: correct nginx script
- Add workers - Add correct media type to /post
1 parent e49c149 commit 0debca9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

nix/nginx/conf/custom.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ location /post {
2424
if ($request_method != 'POST'){
2525
return 405;
2626
}
27-
if ($http_accept != "application/json") {
27+
if ($http_content_type != "application/json") {
2828
return 406;
2929
}
30+
default_type application/json;
3031
echo_read_request_body;
3132
echo $request_body;
3233
}

nix/nginx/conf/nginx.conf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
daemon off;
22
pid ./nginx.pid;
33

4-
events {}
4+
worker_processes auto;
5+
6+
events {
7+
worker_connections 1024;
8+
}
59

610
http {
711

0 commit comments

Comments
 (0)