Score:0

Nginx add_header header not capitalized

in flag

I am running nginx in ubuntu 20.04

I'm trying to set Cache-Control header to no-cache as well as Access-Control-Allow-Origin to * in nginx.

Here is the configuration for my server location

location / {
  gunzip on;
  add_header 'Cache-Control' 'no-cache' always;
  add_header 'Access-Control-Allow-Origin' *;
  root /home/user/apps/client/wwwroot/;
  try_files $uri $uri/ /index.html =404;
}

But when I try to get the site in postman, I get the non-capitalized headers

access-control-allow-origin * and cache-control no-cache

As you can see they are not capitalized, I have tried to set the header name using 'Header-Name' as well as Header-Name

The problem is that my Blazor WebAssembly app is not checking for a newer version of the static files in my server

Score:0
jp flag

HTTP headers are case-insensitive and HTTP/2 requires headers to be converted to lowercase. You need to check your application if it works with Cache-Control headers correctly.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.