1

I was getting following response after making a curl request to an endpoint

HTTP/2 200 
date: Mon, 24 Jun 2019 10:11:39 GMT
content-type: text/html; charset=UTF-8
content-length: 1952
server: nginx
x-powered-by: Express
cache-control: public, max-age=0
last-modified: Tue, 21 May 2019 10:11:37 GMT
vary: Accept-Encoding
x-frame-options: SAMEORIGIN
strict-transport-security: max-age=31536000
x-content-type-options: nosniff
x-xss-protection: 1; mode=block;
accept-ranges: bytes

Ultimately, I don't want accept-ranges: bytes , instead it must be "accept-ranges: none"

I tried following in the nginx configurations

 server {
 ..... 
 .....
 .....
       location / {
        ......        
        ......
              max_ranges 0;
              proxy_force_ranges on;
        ......
        }
  }

What could be the possible issue ?

Tanay Suthar
  • 453
  • 3
  • 8
  • 19

1 Answers1

1

Did you tried removing "proxy_force_ranges on" ? It enables byte-range support for responses from the proxied server regardless of the “Accept-Ranges” field in these responses.

Fotiou D.
  • 431
  • 6
  • 11