I want to use NGINX as dynamic local CDN with proxy_pass based on Referer header and $http_refere variable. The problem is that the Referer (variable too) header contains a "/" at the end of the URL. I want to delete trailing slash in $http_referer. How can I do it?
My NGINX location:
location / {
add_header 'Access-Control-Allow-Origin' '*';
add_header Referrer-Policy 'strict-origin';
proxy_pass $http_referer;
}
Aucun commentaire:
Enregistrer un commentaire