use built-in getallheaders function which works in nginx now too