How do I return the HTTP STATUS CODE from the http://127.0.0.1:8080/
Example:
- http://127.0.0.1:8080/api/example returns a 500 then when accessing ttp://127.0.0.1/api/example it should also return 500,
and so on for the any other status code, please help??? spent a few hours with this one...
pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
server {
listen 80;
server_name 127.0.0.1;
location / {
proxy_pass http://127.0.0.1:8888;
proxy_http_version 1.1;
proxy_pass_request_headers on;
gzip_static on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header Status $status;
}
location /api/ {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_pass_request_headers on;
gzip_static on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header Status $status;
}
}
}