Every time I send a API request to my server I want send informations like device type and OS version (from my mobile app). My first thought is to use User Agent but I wonder if there's any benefits to use custom http header like "X-deviceType" or/and "X-osVersion" instead.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I am using the X-Device HTTP Header.
Works well for the most part, however I have noticed that some requests from behind a proxy seem to be stripping the data from that header.