[Workers] Request headers documentation#1817
Conversation
Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>
|
|
||
| ### Request headers | ||
|
|
||
| * `CF-Connecting-IP`: In same zone Worker subrequests, the value of `CF-Connecting-IP` reflects the value of `x-real-ip` (the client’s IP). `x-real-ip` can be altered by the user in their Worker script. |
There was a problem hiding this comment.
Should we hyphenate same-zone?
|
|
||
| * `CF-Connecting-IP`: In same zone Worker subrequests, the value of `CF-Connecting-IP` reflects the value of `x-real-ip` (the client’s IP). `x-real-ip` can be altered by the user in their Worker script. | ||
|
|
||
| In cross-zone subrequests from one Cloudflare customer zone to another Cloudflare customer zone, the `CF-Connecting-IP` value will be set to the Worker client IP address `'2a06:98c0:3600::103'` for security reasons. |
There was a problem hiding this comment.
Should we consolidate whether we use a genitive structure (client's IP) or a noun-noun compound (client IP). Also, do we want to specify address?
There was a problem hiding this comment.
@abracchi-tw I worked on this with an FL engineer as well as the dev advocates so that's where the 'client IP' came out of. The address went through a security review and they greenlit it so decided to put it in for maximum ~ knowledge ~
|
|
||
| When no Worker subrequest is triggered, `cf-connecting-ip` reflects the client's IP address and the `x-real-ip` header is stripped. | ||
|
|
||
| * `CF-Worker`: Added to all Worker subrequests sent via `fetch()`. Set to the name of the zone which owns the Worker making the subrequest. For example, a Worker script on route for `foo.example.com/*` from `example.com` will have all subrequests with the header: |
There was a problem hiding this comment.
Do we want what's after : to be a full sentence? As is the case for the first point of the list
There was a problem hiding this comment.
@abracchi-tw I thought the same thing but with the first bullet point, it is unavailable because I have to specify 3 different subrequest use cases for the header. For this header, and the last header, I don't use full sentences.
Co-authored-by: Luke Edwards <luke.edwards05@gmail.com>
kristianfreeman
left a comment
There was a problem hiding this comment.
super cool to have this documented!
closes #61