Giter VIP home page Giter VIP logo

Comments (12)

kunickiaj avatar kunickiaj commented on August 20, 2024 7

If you're using contour for TLS termination x-forwarded-proto is needed in many cases -- couldn't find a way to set that.

from contour.

hazsetata avatar hazsetata commented on August 20, 2024 4

+1 for this: my use-case would require to add headers for requests. I would like to "mesh" Contour with Linkerd2, but it requires an extra header to be set, something like this:

l5d-dst-override: $service_name.$namespace.svc.cluster.local:80

Without this feature the ingress can't be part of the service-mesh, and can't take advantage of the mTLS feature provided by Linkerd2.

from contour.

davecheney avatar davecheney commented on August 20, 2024 1

Here's a design I'm thinking of

spec:
  routes:
    prefix: /foo
      headers:
        add:
        - name: "x-request-id"
           value: "fixed value"
        - name: "x-something"
           value: "another fixed value"
       remove:
       - name: "Date"
       - name: "ETag"

from contour.

wmorgan avatar wmorgan commented on August 20, 2024 1

Hear hear. Would love to be able to add Contour to the list of Linkerd ingresses here: https://linkerd.io/2/tasks/using-ingress/

from contour.

Malinskiy avatar Malinskiy commented on August 20, 2024 1

@davecheney would love to help work on this.

I see some work done for the Ingress object according to your initial suggestion in #408 and a sample provided for IngressRoute. Can we finalise the desired configuration format at this point so that we can implement this?

I'd argue that support for mimicking the relevant envoy api should exist in both IngressRoute and Ingress (possibly limited compared to IngressRoute)

from contour.

drobinson123 avatar drobinson123 commented on August 20, 2024

I'm interested in implementing ingress level support. Is this annotation format acceptable?

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: example
  annotations:
    contour.heptio.com/response-headers-to-add: |
      Strict-Transport-Security "max-age=31536000; includeSubDomains"
      Public-Key-Pins: max-age=2592000; pin-sha256="E9CZ9INDbd+2eRQozYqqbQ2yXLVKB9+xcprMF+44U1g="
    contour.heptio.com/response-headers-to-remove: |
      X-Powered-By
spec:
  ...

from contour.

davecheney avatar davecheney commented on August 20, 2024

from contour.

drobinson123 avatar drobinson123 commented on August 20, 2024

Encoding the header in the annotation will do, I have no preference.

Headers are appended to requests/responses in a specific order, so we may be able to do both ingress and route. I'll experiment and see how it could work.

One other question, I assume we only care about response headers? I don't have any use-cases for adding headers to requests.

from contour.

davecheney avatar davecheney commented on August 20, 2024

from contour.

zxvdr avatar zxvdr commented on August 20, 2024

@davecheney, can you please provide some guidance regarding the annotation format? Unless I'm mistaken, the format I used in #408 is the format you suggested.

from contour.

kellyaa avatar kellyaa commented on August 20, 2024

+1 on wanting to see this happen. Right now I have a need to customize the Host header for route when proxying a request.

from contour.

drobinson123 avatar drobinson123 commented on August 20, 2024

Here's a design I'm thinking of

spec:
  routes:
    prefix: /foo
      headers:
        add:
        - name: "x-request-id"
           value: "fixed value"
        - name: "x-something"
           value: "another fixed value"
       remove:
       - name: "Date"
       - name: "ETag"

It's not clear whether this adds/removes headers from requests or responses. Both should be supported imho. Request headers need to be added for the Linkerd use-case, and response headers added for HSTS.

from contour.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.