Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use labels to set custom HTTP headers in Docker backend #2028

Closed
DamiaPoquet opened this issue Aug 30, 2017 · 5 comments
Closed

Use labels to set custom HTTP headers in Docker backend #2028

DamiaPoquet opened this issue Aug 30, 2017 · 5 comments
Assignees
Labels
area/provider/docker kind/enhancement a new or improved feature. priority/P2 need to be fixed in the future status/5-frozen-due-to-age
Milestone

Comments

@DamiaPoquet
Copy link

DamiaPoquet commented Aug 30, 2017

Do you want to request a feature or report a bug?

Request a feature

What did you do?

Add a label to the Docker container like this:

traefik.frontend.customResponseHeaders=X-Custom-Header: foo; bar

What did you expect to see?

Traefik should use the Header Middleware described in #1236 to serve the application with the desired header.

What did you see instead?

Nothing happens.

Output of traefik version: (What version of Traefik are you using?)

Version:      v1.4.0-rc1
Codename:     roquefort
Go version:   go1.9
Built:        2017-08-29_08:35:24AM
OS/Arch:      linux/amd64

What is your environment & configuration (arguments, toml, provider, platform, ...)?

graceTimeOut = "10s"
traefikLogsFile = "/var/log/traefik/traefik.log"
accessLogsFile = "/var/log/traefik/access.log"
logLevel = "WARN"

[acme]
email = "[email protected]"
storage = "acme.json"
entryPoint = "https"
acmeLogging = true
OnHostRule = true

[entryPoints]
  [entryPoints.http]
  address = ":80"
    [entryPoints.http.redirect]
      entryPoint = "https"
  [entryPoints.https]
  address = ":443"
    [entryPoints.https.tls]

[web]
address = ":8080"

[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "docker.domain"
watch = true
exposedbydefault = false
@ldez ldez added area/provider/docker kind/enhancement a new or improved feature. priority/P2 need to be fixed in the future labels Aug 30, 2017
@dtomcej
Copy link
Contributor

dtomcej commented Aug 30, 2017

I would like to take a crack at this first.

Have cycles this week. Should have a PR started today.

@srwhite
Copy link

srwhite commented Sep 8, 2017

This looks like a great step forward. However, and I'm not an expect in this code, but from a quick look:

It would be nice if we could make all of these methods of configuration equivalent without having to duplicate the list of options in each provider.

@faburem
Copy link

faburem commented Sep 25, 2017

+1 I think this would be a great improvement to set custom headers on a container level

@danielbehrendt
Copy link

+1

@ldez
Copy link
Contributor

ldez commented Sep 27, 2017

Remember the gentle way to participate:

  • add a "reaction" on the first message of the issue.
  • add more useful and detailed information on the subject.
  • resolve the issue by making a PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/provider/docker kind/enhancement a new or improved feature. priority/P2 need to be fixed in the future status/5-frozen-due-to-age
Projects
None yet
Development

No branches or pull requests

7 participants