I want nginx to read a configuration string when receiving a request, if it is a specific file, add it to the header of this html file, and return it together as a custom header. Is it possible?
Or is there any other way to send the string in the configuration file together with the html file, instead of going through the overhead of another ajax request for a string?
It can be realized. The location conditions can be combined with regular expressions. Use add_header to increase the content of the returned http header