Commit graph

227 commits

Author SHA1 Message Date
Fernandez Ludovic
c84fb9895e Merge branch 'v1.5' into master 2018-01-02 15:21:17 +01:00
Ludovic Fernandez
bfd142b13b Fix custom headers template 2018-01-02 10:10:04 +01:00
Ludovic Fernandez
59549d5f39 Use pointer of error pages 2017-12-21 11:26:03 +01:00
Fernandez Ludovic
f6520727a3 Merge branch 'v1.5' into master 2017-12-15 22:16:48 +01:00
Kevin Risden
bddad57a7b Fix RawPath handling in addPrefix 2017-12-15 03:50:07 +01:00
Sebastian Bauer
328be161d6 Forward Authentication: add X-Forwarded-Uri 2017-12-10 00:58:21 +01:00
Michael
f6181ef3e2 Fix custom headers replacement 2017-11-23 17:40:03 +01:00
Fernandez Ludovic
66591cf216 Merge tag 'v1.4.4' into master 2017-11-23 15:21:47 +01:00
Marco Jantke
676b79db42 Fix raw path handling in strip prefix 2017-11-21 14:28:03 +01:00
Ludovic Fernandez
05a9350e57 Use contants from http package. 2017-11-20 09:40:03 +01:00
Fernandez Ludovic
8719f2836e Merge 'v1.4.3' into master
Release v1.4.3
2017-11-15 23:01:08 +01:00
Ludovic Fernandez
0c702b0b6b Revert "Merge v1.4.2 into master" 2017-11-15 18:18:03 +01:00
Ludovic Fernandez
6fcab72ec7 Merge v1.4.2 into master 2017-11-14 16:48:03 +01:00
Ludovic Fernandez
5c119fe2d6 Exclude GRPC from compress 2017-11-10 14:12:02 +01:00
SALLEYRON Julien
9bd0fff319 Keep status when stream mode and compress 2017-11-09 00:48:03 +01:00
Michael
e3131481e9 chore: sort imports 2017-11-08 11:40:04 +01:00
Kendrick Erickson
2b4d33e919 Pass through certain forward auth negative response headers 2017-11-02 11:06:03 +01:00
Tiscs Sun
5042c5bf40 Added ReplacePathRegex middleware 2017-10-30 12:54:03 +01:00
Ludovic Fernandez
aa308b7a3a Add TrustForwardHeader options. 2017-10-16 12:46:03 +02:00
Emile Vauge
6287a3dd53 Add trusted whitelist proxy protocol 2017-10-10 14:50:03 +02:00
Marco Jantke
fd70e6edb1 enable prefix matching within slash boundaries 2017-10-06 11:34:03 +02:00
Ludovic Fernandez
5cc49e2931 bug command. 2017-10-02 10:32:02 +02:00
Marco Jantke
9d00da7285 fix SSE subscriptions when retries are enabled 2017-09-20 18:40:03 +02:00
Ludovic Fernandez
cb05f36976 Manage Headers for the Authentication forwarding. 2017-09-18 17:48:07 +02:00
Ludovic Fernandez
7c35337999 Remove GZIPHandler fork. 2017-09-18 11:04:03 +02:00
Marco Jantke
cf387d5a6d Enable loss less rotation of log files 2017-09-15 15:02:03 +02:00
Ludovic Fernandez
651d993d9c prometheus, HTTP method and utf8 2017-09-08 11:22:03 +02:00
Ludovic Fernandez
8339139400 Access log default values 2017-09-07 10:54:03 +02:00
Marco Jantke
dae7e7a80a add RetryAttempts to AccessLog in JSON format 2017-08-28 12:50:02 +02:00
Daniel Rampelt
52b69fbcb8 Add forward authentication option 2017-08-25 18:22:03 +02:00
mildis
92fb86b66f log X-Forwarded-For as ClientHost if present 2017-08-25 13:00:03 +02:00
Fernandez Ludovic
8235cd3645 refactor: minor changes. 2017-08-25 11:08:02 +02:00
Marco Jantke
e6c2040ea8 Extract metrics to own package and refactor implementations 2017-08-23 20:46:03 +02:00
Ludovic Fernandez
5313922bb7 compress: preserve status code 2017-08-21 11:10:03 +02:00
Ludovic Fernandez
759c269dee Code cleaning. 2017-08-18 02:18:02 +02:00
Richard Shepherd
4e5fcac9cb Add log file close and reopen on receipt of SIGUSR1 2017-08-11 12:04:58 +02:00
Alex Antonov
6b133e24b9 Added RetryMetrics to DataDog and StatsD providers 2017-08-09 02:54:35 +02:00
Fernandez Ludovic
d456c2ce6a Merge 'v1.3.5' 2017-08-01 19:32:44 +02:00
Alex Antonov
69c628b626 DataDog and StatsD Metrics Support
* Added support for DataDog and StatsD monitoring
* Added documentation
2017-07-21 00:26:43 +02:00
Fernandez Ludovic
40d9058bb6 refactor: migration Negroni from codegangsta to urfave 2017-07-20 15:19:15 +02:00
Marco Jantke
074b31b5e9 respond with 503 on empty backend 2017-07-19 19:28:24 +02:00
dedalusj
a09a8b1235 Fix replace path rule
* Fix replace path rule
* test: add RequestURI tests.
2017-07-19 10:27:52 +02:00
Fernandez Ludovic
36ee69609e fix: double compression. 2017-07-18 11:27:24 +02:00
Ludovic Fernandez
2e84b1e556 Enhance integration tests
* refactor: remove unused code.
* refactor: factorize Traefik cmd start.
* refactor(whitelist): minor change.
* refactor(accesslog): better use of checker.
* refactor(errorpages): factorize containers IP variables.
* refactor(integration): refactor cmdTraefikWithConfigFile.
2017-07-10 14:58:31 +02:00
Ben Parli
121c057b90 Custom Error Pages (#1675)
* custom error pages
2017-07-01 01:04:18 +02:00
Marco Jantke
0055965295 add status code to request duration metric 2017-06-26 18:21:28 +02:00
Marco Jantke
f79317a435 retry only on real network errors
Now retries only happen when actual network errors occur and not only
anymore based on the HTTP status code. This is because the backend could
also send this status codes as their normal interface and in that case
we don't want to retry.
2017-06-19 20:13:46 +02:00
Fernandez Ludovic
2a578748fd Merge branch 'v1.3' 2017-06-14 22:26:35 +02:00
Fernandez Ludovic
d87c4d89e9 fix: Double GZIP. 2017-06-14 21:13:38 +02:00
Marco Jantke
885b9f371c enable logging to stdout for access logs 2017-06-13 23:43:38 +02:00
Daniel Tomcej
f275e4ad3c Create Header Middleware 2017-06-13 12:34:17 +02:00
Fernandez Ludovic
7399a83c74 refactor: Use Statefull interface in access log. 2017-06-09 23:55:49 +02:00
Fernandez Ludovic
18c3d8dc62 test: add AddPrefix test. 2017-06-09 23:55:49 +02:00
Fernandez Ludovic
a1a0420314 test: use MustNewRequest. 2017-06-09 23:55:49 +02:00
Fernandez Ludovic
63f9bccf9f refactor: fix typos.
refactor: typo in whitelister file name.
2017-06-09 23:55:49 +02:00
Fernandez Ludovic
18d11e02d0 test: simplify stripPrefix* tests. 2017-06-09 23:55:49 +02:00
Marco Jantke
e007bb7546 add metrics for backend_retries_total 2017-06-07 08:56:50 +02:00
Richard Shepherd
a9216e24f5 Add JSON as access logging format 2017-06-06 16:26:22 +02:00
Fernandez Ludovic
b6c5c14447 refactor: Enhance rules tests.
- refactor: change incorrect package.
- refactor: test readability.
2017-05-31 10:34:00 +02:00
Fernandez Ludovic
cbccdd51c5 refactor: Logs & errors review.
- log & error: remove format if not necessary, add if necessary.
- add constants for k8s annotations.
- fix typos
2017-05-30 23:33:27 +02:00
Fernandez Ludovic
2833d68f15 Merge branch 'v1.3' into merge-back-1_3_0-rc3 2017-05-24 20:39:38 +02:00
Richard Shepherd
64e8b31d49 Switch access logging to logrus 2017-05-24 14:20:42 +02:00
Josh Toft
bc0121808a Fix behavior for PathPrefixStrip
When pushing data to downstream proxies; malformed requests were being
sent.

The corrected behavior is as follows:

| Route Stripped    |     URL                |  Passed to Backend |
| ----------------- | ---------------------- | ------------------ |
| /                 |     /                  |  /                 |

| Route Stripped    |     URL                |  Passed to Backend |
| ----------------- | ---------------------- | ------------------ |
| /stat             |     /stat              |  /                 |
| /stat             |     /stat/             |  /                 |
| /stat             |     /status            |  /status           |
| /stat             |     /stat/us           |  /us               |

| Route Stripped    |     URL                |  Passed to Backend |
| ----------------- | ---------------------- | ------------------ |
| /stat/            |     /stat              |  /stat             |
| /stat/            |     /stat/             |  /                 |
| /stat/            |     /status            |  /status           |
| /stat/            |     /stat/us           |  /us               |

Prior, we could strip the prefixing `/`, and we'd also ignore the case
where you want to serve something like `/api` as both the index and as a
subpath.

Additionally, this should resolve a myriad of issues relating to
kubernetes ingress `PathPrefixStrip`.
2017-05-24 10:50:12 +02:00
Fernandez Ludovic
8ad31d6eb4 Merge remote-tracking branch 'upstream/v1.3' into merge-v1_3 2017-05-22 11:38:28 +02:00
tanyadegurechaff
987ae92f53 Create log folder if not present 2017-05-19 15:49:02 +02:00
MaZderMind
5f0b215e90 IP Whitelists for Frontend (with Docker- & Kubernetes-Provider Support) 2017-05-19 15:19:29 +02:00
Emile Vauge
f8ea19d29c
Merge branch 'v1.3' into merge-v1.3.0-rc2-master 2017-05-17 11:44:53 +02:00
Emile Vauge
48a91d05b5
Add Recover tests 2017-05-15 09:17:33 +02:00
Emile Vauge
111251da05
Adds Panic Recover middleware
Signed-off-by: Emile Vauge <emile@vauge.com>
2017-05-15 09:17:33 +02:00
Emile Vauge
71cec1580b
Fix stats responseRecorder Hijacker
Signed-off-by: Emile Vauge <emile@vauge.com>
2017-05-15 09:17:33 +02:00
Fernandez Ludovic
d2c8824902 refactor: restore "First stage of access logging middleware."
This reverts commit 82651985c4.
2017-05-11 16:27:13 +02:00
Emile Vauge
82651985c4
Revert "First stage of access logging middleware. Initially without any output appenders."
This reverts commit 73a1b172ed.
2017-05-03 17:30:31 +02:00
Stéphane Seguin
bf3673879f Fix regex with PathStrip 2017-04-28 17:33:14 +02:00
ssttevee
aa8375e82b added path replacement rule 2017-04-26 23:33:32 -07:00
Richard Shepherd
73a1b172ed First stage of access logging middleware. Initially without any output appenders. 2017-04-23 00:46:45 +02:00
Martin Baillie
fa683fa7e4 Pass stripped prefix downstream as header 2017-04-16 19:24:26 +10:00
Matevz Mihalic
f324983946
Fix metrics registering 2017-04-11 22:36:55 +02:00
Kent Rancourt
7357417f48 Allow usersFile to be specified for basic or digest auth 2017-03-09 20:24:44 -05:00
Bilal Amarni
86fd5b4c97
Set a NopCloser request body with retry middleware
As the http client always closes the request body,
this makes sure the request can be retried if needed.

Fixes #1008
2017-02-02 17:24:49 +01:00
Alberto
fa1090b6eb Improving instrumentation. (#1042) 2017-01-17 18:14:13 +01:00
enxebre
175659a3dd Support for Metrics and Prometheus. 2017-01-16 15:00:16 +01:00
Vincent Demeester
8a348423ae Import order as goimports does
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-30 19:04:02 +01:00
Emile Vauge
bef55db120 Merge branch 'master' into addprefix 2016-12-20 12:18:37 +01:00
Julien Salleyron
d9fc66fdbc Add Rule AddPrefix 2016-12-19 17:12:52 +01:00
Emile Vauge
3ebfd729cf
Refactor StatsRecorder
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-12-19 15:24:00 +01:00
Ian
94bb7a1435 Add ability to set authenticated user in request header (#889)
* Add ability to set authenticated user in request header

Some web applications provide the ability to authorize users based on
the authenticated from Basic Auth. This patch provides a way to set a
key to which the authenticated user can be set in the Header.

For example, if I set `HeaderValue = "X-WebAuth-User"` and authenticate,
my application will be able to read my user name from that header and
provide me with the proper access.

This fixes #802
2016-12-16 16:42:51 +01:00
Emile Vauge
7c375e8fd9
Fix ResponseRecorder Flush
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-10-26 16:26:19 +02:00
Emile Vauge
e72e65858f
Challenge certs PEM encoding
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-09-30 11:26:25 +02:00
Emile Vauge
a42845502e
Add ACME store
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-09-30 11:26:17 +02:00
tuier
a58750992d lint 2016-09-28 23:04:18 +01:00
tuier
17546c3a08 Add HTTP compression 2016-09-28 23:04:18 +01:00
Emile Vauge
11297b38c5
Remove misused Fatal* 2016-08-19 10:36:54 +02:00
Bruce Lee
3a736ad4a8 Make duration logging consistent
GH #559 points out that the logging of the elapsed time is inconsistent
depending on the scale of the measured time; this is due to Duration’s
String handling.

With this PR, I propose that traefik logs millis, and not fractions of
millis.
2016-08-15 08:43:20 -04:00
Emile Vauge
bc8a92caa9
Add basic/digest auth tests
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-07-28 18:19:47 +02:00
Emile Vauge
3a5b67a3e1
Add basic/digest auth
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-07-28 18:19:47 +02:00
Emile Vauge
ac9946c697
Fix retry headers, simplify ResponseRecorder
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-07-04 19:32:19 +02:00
Emile Vauge
e4ed7fd8f7
Fix bad circuit breaker expression
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-06-23 16:33:54 +02:00
Emile Vauge
450d86be7d
Fix websocket connection Hijack
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-06-18 13:37:21 +02:00
Emile Vauge
208998972a
Add routes priorities
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-06-07 09:17:39 +02:00
Emile Vauge
cb0c1d34a2
fix hijack logger middleware
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-05-12 16:32:12 +02:00
David Tootill
0a0063fa27 Tweak comments to satisfy golint 2016-04-28 04:00:38 -07:00
David Tootill
bf1f6f663a Minor refactor as requested in PR comments 2016-04-28 10:53:02 +00:00
David Tootill
64b78461f6 Remove some debug logs (requested in review) 2016-04-27 09:25:13 -07:00
David Tootill
2a76a717e6 Add access log integration test 2016-04-20 11:54:57 -07:00
David Tootill
04dd41ac3b Minor corrections 2016-04-20 01:25:22 +00:00
David Tootill
10815eca8e Initial update - manage access log 2016-04-19 16:45:59 -07:00
Emile Vauge
c1078c4374
Fix races
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-04-14 15:27:42 +02:00
Emile Vauge
4d2c85ffdc
Fix multiple response.WriteHeader calls
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-04-06 14:30:29 +02:00
Emile Vauge
8486766a60
Add multiple rules
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-04-06 13:27:54 +02:00
Emile Vauge
8737530a7d
Refactor frontends rules
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-03-31 13:11:07 +02:00
Emile Vauge
0cbe34eef3
Move to containous/oxy, remove websocket specific support
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-03-15 23:42:52 +01:00
Emile Vauge
4042938556
add handler switcher instead of Manners
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-03-04 15:55:28 +01:00
Emile Vauge
122783e36b
Add PathPrefixStrip and PathStrip rules
Signed-off-by: Emile Vauge <emile@vauge.com>
2016-02-26 15:58:55 +01:00
emile
c22598c8ff
Add multiple entry points support, add entry point redirection 2016-02-10 12:14:16 +01:00
Vincent Demeester
9387235a04 Linting middlewares package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-11-02 21:14:54 +01:00
Jaime Pillora
ae6bda3220 Pass websocket headers to backend 2015-10-29 22:45:41 +01:00
emile
d390f86de2 Code review corrections 2015-10-27 00:26:35 +01:00
emile
46d7cc83c9 Better logs http status in websocket 2015-10-23 17:46:50 +02:00
emile
80f4884d50 Added websocket support https://github.com/EmileVauge/traefik/issues/8 2015-10-14 10:42:27 +02:00
emile
0bdd537fb4 Configuration on cicuitbreakers and load balancers 2015-09-28 23:16:32 +02:00
Vincent Demeester
c038dfbd54 Fix some typos, fmt and imports :)
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-24 17:16:13 +02:00
emile
f5ddbcbcde Logrus logging backend https://github.com/EmileVauge/traefik/issues/15 2015-09-24 14:53:51 +02:00
emile
616c58ad4b Circuit breaker middleware 2015-09-19 13:02:59 +02:00
Vincent Demeester
fd835e1fcd Format some file using gofmt
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2015-09-15 22:32:32 +02:00
emile
07b520fe23 docker backoff, routes middleware 2015-09-12 19:22:44 +02:00
emile
0881151a44 defer close files 2015-09-12 15:20:56 +02:00
emile
36847f671f Negroni middlewares 2015-09-12 15:10:03 +02:00