Reputation: 13759
Both the local testing and live servers the PHP $_SERVER['HTTP_IF_NONE_MATCH']
variable isn't set. How do I enable $_SERVER['HTTP_IF_NONE_MATCH']
with Apache or PHP or trigger it in an HTTP request? The live server is a shared hosting account so please no just blindly edit the httpd.conf responses.
Upvotes: 0
Views: 809
Reputation: 3408
You should send an If-None-Match
header to your endpoint. If so the HTTP_IF_NONE_MATCH
variable should contain the value of the If-None-Match
header.
curl http://my/endpoint --header 'If-None-Match: "my-custom-etag-value"'
Upvotes: 0
Reputation: 15091
If someone needs this for Nginx too, you can put this in your nginx.conf
.
fastcgi_param HTTP_IF_NONE_MATCH $http_if_none_match;
Upvotes: 0
Reputation: 2488
Just include it in a .htaccess
file within your ROOT:
RewriteEngine on
RewriteRule .* - [E=HTTP_IF_NONE_MATCH:%{HTTP:If-None-Match}]
Upvotes: 1