August 2017
Intermediate to advanced
278 pages
8h 53m
English
While you may not have looked closely, many of the top websites add additional header information to assist with debugging. Facebook adds an x-fb-debug header, Twitter has an x-transaction header, and sites such as https://www.wired.com/ insert the x-served-by headers to help trace what proxies your request has passed through. This information doesn't have any impact on the end user; however, the information is invaluable when trying to diagnose hard-to-diagnose cases. While much of the low-level debug information can only be produced within your application code, at a higher level, you can easily incorporate a few helpful headers. Here's an example:
add_header X-Host $hostname; add_header X-Request-ID $request_id; add_header ...
Read now
Unlock full access