At the moment I am just getting a redirect in the browser to https://acestream-engine-latest.onrender.com/ and getting a response. When trying a simple http request just a 502 error.
What am I doing wrong?
<code>events {}
http {
server {
listen 80;
location / {
proxy_pass https://acestream-engine-latest.onrender.com/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Accept-Encoding ""; # Tell the backend not to send gzip
gzip off;
sub_filter 'https://acestream-engine-latest.onrender.com' 'http://127.0.0.1';
sub_filter_once off;
sub_filter_types application/json application/vnd.apple.mpegurl application/x-mpegURL;
}
}
}
</code>
<code>events {}
http {
server {
listen 80;
location / {
proxy_pass https://acestream-engine-latest.onrender.com/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Accept-Encoding ""; # Tell the backend not to send gzip
gzip off;
sub_filter 'https://acestream-engine-latest.onrender.com' 'http://127.0.0.1';
sub_filter_once off;
sub_filter_types application/json application/vnd.apple.mpegurl application/x-mpegURL;
}
}
}
</code>
events {}
http {
server {
listen 80;
location / {
proxy_pass https://acestream-engine-latest.onrender.com/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Accept-Encoding ""; # Tell the backend not to send gzip
gzip off;
sub_filter 'https://acestream-engine-latest.onrender.com' 'http://127.0.0.1';
sub_filter_once off;
sub_filter_types application/json application/vnd.apple.mpegurl application/x-mpegURL;
}
}
}
The task is as follows:
- http request to 127.0.0.1/(request)
- Redirect the request to https://acestream-engine-latest.onrender.com/(request)
- Receive the response, pre-processing it on 127.0.0.1.