It's not possible to deliver headers to paths based on query parameters but it is possible to respond with headers on a proxied path.

/example
  example: scott

The above should be set in a _headers file.

/example / 200!

The above should be set in a _redirects file.

As a result, /example and / will serve the same content but the /example path will respond with the header we provided in our _headers file.

Visit /example and see for yourself!