How to rewrite based on custom header in nginx
高洛峰
高洛峰 2017-05-16 17:21:16
0
1
510

I am working on an API interface recently and want to write the API version to the header. So how do I get this variable from nginx and rewrite it according to it? Mainly, I don't know how to get this custom variable. Please, fellow Taoists

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(1)
淡淡烟草味

It is recommended to write the version number into the url, either path or parameter. nginx can easily get this value in the configuration file and process it.
If it is a header, you need to compile and configure another module.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!