apocas / docker-modem

Docker Remote API network stack driver.
Apache License 2.0
234 stars 112 forks source link

Use constructor 'opts' attribute to override default configuration ad… #104

Closed glours closed 5 years ago

glours commented 5 years ago

…d default header attribute

This PR add a default header attribute to specify for example a host or a specific user-agent, and add capability to override default configuration when calling the Modem constructor with an object.

const docker = new Docker({
  'headers': {
    'user-agent': 'my-specific-user-agent',
    'host': 'my-specific-host',
  },
});

Fix https://github.com/apocas/docker-modem/issues/67 & https://github.com/apocas/dockerode/issues/302 Signed-off-by: Guillaume Lours guillaume.lours@docker.com

apocas commented 5 years ago

👍