http-add-on icon indicating copy to clipboard operation
http-add-on copied to clipboard

Add support for http header routing

Open erich23 opened this issue 1 year ago • 2 comments

tableMemory.store now holds a list of *httpv1alpha1.HTTPScaledObject

When routing, iterate through list of *httpv1alpha1.HTTPScaledObject and match the headers based on passed in http headers. Here are the rules:

  1. After matching on host and pathPrefix, if any http request header and matches any headers in HTTPScaledObject.spec.Headers then route to the first match.
  2. If no http request header matches any headers in in any HTTPScaledObject, then route to one which does not specify HTTPScaledObject.spec.Headers
  3. If there is no suchHTTPScaledObject which specifies no .spec.Headers, fail routing.

Checklist

  • [ ] Commits are signed with Developer Certificate of Origin (DCO)
  • [ ] Changelog has been updated and is aligned with our changelog requirements
  • [ ] Any necessary documentation is added, such as:

Fixes #

erich23 avatar Dec 17 '24 19:12 erich23

@erich23 is there any update regarding this?

zackijack avatar Mar 25 '25 13:03 zackijack

I have something that works with basic header routing locally, but I think the community needs something that's on-par with CNCF project standards: https://github.com/kedacore/http-add-on/issues/1177#issuecomment-2560526309. Unfortunately, I don't have the bandwidth to deliver something that meets the listed requirements.

erich23 avatar Mar 25 '25 13:03 erich23