问题
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.
来源:https://stackoverflow.com/questions/18475724/should-i-use-custom-headers-or-useragent-header-to-send-device-informations-to-t