Nginx Download MP3 206 Partial Content HTTP Response

Francis Daly francis at daoine.org
Sun Nov 8 19:27:49 UTC 2020


On Sun, Nov 08, 2020 at 08:07:07AM -0500, garycnew at yahoo.com wrote:

Hi there,

> Nginx is configured as a reverse proxy server in this architecture.  It is
> successfully working except with this AJAX call.

In general, nginx does not care whether a request to it comes from AJAX,
or clicking a link, or by any other means.

But your description seems to indicate that http requests to nginx work,
while https requests to nginx are failed by the client, because the
client does not like the certificate that nginx presents.

(There's not a lot nginx can do to fix that, other than to arrange that
the client does like the certificate that nginx presents.)

> My guess is that the upstream server is responding with the Host header as
> example.com:443 and needs to be rewritten prior to the client making the
> subsequent, asynchronous AJAX request to the upstream server.

I'm not sure what that means, I'm afraid.

Responses don't have a Host: header, in general. And the specific responses
that you have shown in this thread, do not have Host: headers.

> Any idea how to evaluate and modify the Host header prior to the subsequent,
> asynchronous AJAX request to the upstream server?

Is there any chance that the response body content from the upstream
includes links to https urls? In general, nginx will not modify
the response body content from an upstream -- it is much easier to
reverse-proxy a web service if any included links doe not start with
"http://" or "https://"; instead starting with "/" or (better) anything
else, including "../".


> Thank you for your time and assistance.
> 
> Respectfully,
> 
> 
> Gary
> 
> Posted at Nginx Forum: https://forum.nginx.org/read.php?2,289905,289915#msg-289915
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
> 

-- 
Francis Daly        francis at daoine.org


More information about the nginx mailing list