Javier Garza

Injecting an HTTP header on requests to the origin indicating the client protocol version (http/1.1, h2 or spdy)

Blog Post created by Javier Garza Employee on Jun 22, 2016

A couple of people recently asked me this question, so I thought I would share the answer here.

 

Question: Is there a way of letting the origin server know the HTTP protocol the Edge has negotiated with the end user?

 

Answer: Yes, it is. Just add a new rule like the one below if you want to send the negotiated protocol (h2 for HTTP/2 or empty for HTTP/1.1)

 

Note: PROTOCOL_NEGOTIATED_VAR is just an example, you can choose a header name of your choice.

Note: The screenshot below shows how to add a header on the outgoing request to the end user. You could use the behavior "Modify Incoming Request Header" if you want to add the header in the forward request to an Edge Parent or the origin.

 

property manager screenshot

Outcomes