Commit Graph

393 Commits

Author SHA1 Message Date
Umputun
a963516783 switch from legacy FS functions to new constructor 2022-01-06 00:16:18 -06:00
Umputun
1315f04ddf bump deps 2022-01-06 00:16:18 -06:00
Umputun
64f57df860 add support of custom 404 page for assets server 2022-01-06 00:16:18 -06:00
Alexey Nesterov
2e8733b152 Correctly handle URL escaped paths
Consider proxy configuration `*,/test/(.*),https://dest/$1`.

When reproxy accepts a request with URL encoded path, i.e.
'/test/a%205%25%20b/' which the encoded form of '/test/a 5% b',
it is using request.URL.Path which is already URL decoded by Golang.

This causes an error in proxy.go while it is trying to validate the
destination with `url.Parse(match.Destination)` as, strictly speaking,
destination URL is not a valid URL anymore, it is `https://target-dest/a 5% b`.

With this fix, the original escaped URL stays as is, correctly passes
the validation and then it is up to destination server to URL decode and
correctly handle the URL.
2021-12-06 11:00:07 -06:00
Umputun
075f66825a update linter and address all lint warns 2021-11-09 12:47:41 -06:00
Umputun
8c59be3612 implement simple on/off basic-auth for all resources
lint: err shadowing

extract htpasswd file load and add tests
2021-11-09 12:47:41 -06:00
Alexey Nesterov
184d5ba87c Support regex in host / server
Main consideration is backward compatibility. example.com should be treated as an exact
match, where possible. So current order is: exact host, regex host, * or "".

Regex matches are cached for better performance, cache is invalidated once mappings are refreshed.
2021-11-04 12:00:17 -05:00
Vasilii Blazhnov
1783f540f8 Removed non-existent files from .golangci.yml 2021-10-09 18:32:21 -05:00
Umputun
e1caebaa60 typos 2021-09-12 13:07:42 -05:00
Umputun
24610af68b update docs with new section about headers 2021-09-12 13:01:19 -05:00
Umputun
e60d4f5d1a fix link to dockerhub in the badge 2021-09-12 12:42:08 -05:00
Umputun
f036f7a8c7 revendor 2021-09-11 14:46:46 -05:00
Umputun
5a3d0db5d9 mod tidy for go 1.17 2021-09-11 14:46:05 -05:00
Umputun
76fa56777f add ability to drop incoming headers #108
In some cases proxy should sanitize incoming headers. --drop-header and $DROP_HEADERS set list of headers (keys) and those headers removed from the request.
2021-09-11 14:38:56 -05:00
Umputun
f908fa6fe5 update deps and revendor 2021-09-11 14:24:09 -05:00
Umputun
c7a2308267 add OverrideHeadersIn and OverrideHeadersOut support
This is an attempt to address #108

Instead of dedicated support of header`s removal it allows to return a flag indicating plugin's full control over headers. With this flag set, the conductor won't mix response headers with originals but rather will count on a plugin to provide all the headers.
2021-09-07 01:53:54 -05:00
Umputun
506ded3ad4 add a warning on missing configuration file for file provider 2021-08-28 12:25:07 -05:00
Umputun
f610a631e4 add docs about base image and spa mode 2021-08-28 12:16:38 -05:00
Pavel Mineev
55480a9148 center badges in readme 2021-08-13 02:01:59 -05:00
Umputun
d364904dd8 fix flaky tests 2021-08-12 22:31:15 -05:00
dependabot[bot]
935e492461
Bump path-parse from 1.0.6 to 1.0.7 in /site (#105) 2021-08-12 20:08:04 -05:00
Umputun
ee0014e215 trigger site updates on README.md changes 2021-08-11 20:37:51 -05:00
Umputun
2b3ed6f166 remove working dir rewrite 2021-08-11 20:27:50 -05:00
Umputun
362756dd08 fix ci for site dockerfile location 2021-08-11 20:25:03 -05:00
Umputun
2ac1f09c1d change site deployment to container with reproxy inside 2021-08-11 20:21:24 -05:00
Umputun
646b6dd8b2 typo 2021-07-18 15:30:07 -05:00
Umputun
1024305a5f adopt nfpms config for goreleaser changes 2021-07-10 03:37:24 -05:00
Umputun
3a230955f0 add info about limiter and more quick examples 2021-07-09 16:49:09 -05:00
Umputun
803a076b79 fix incorrect detection of header's dbl quotes 2021-07-09 15:20:45 -05:00
Umputun
9218ad8bac simplify unnecessary complicated TestCheckHealth 2021-07-08 17:08:35 -05:00
Umputun
cd41237fa5 lint: simplify empty string check 2021-07-08 16:40:14 -05:00
Umputun
56e040b80b allow longer time to start proxy in limiter test 2021-07-08 16:32:24 -05:00
Umputun
cbe7f6f84d drop leading and trailing dbl-quotes from the headers #100 2021-07-08 16:27:42 -05:00
Umputun
207a467960
Header comma (#101)
* allow comma inside of header env list #100

* set proxy header to manually split version
2021-07-08 02:31:27 -05:00
Umputun
71039681e2
Merge pull request #97
* revendor with latest rest lib

* simplify with passThroughHandler

* add deps for throttling
2021-07-03 01:23:50 -05:00
John
a9c7db27b6 fix broken link to plugin example in README 2021-06-30 10:50:22 -05:00
Umputun
2eb78e0e47 fix typo in mock file name 2021-06-29 20:35:50 -05:00
Umputun
ef649f10dc add a custom static example 2021-06-27 12:59:15 -05:00
Umputun
2d974153f0 add container security text 2021-06-26 12:34:33 -05:00
Umputun
5dcb303615 fix comment typo 2021-06-26 12:12:47 -05:00
Umputun
0a2047fc74 update go-pkgz/rest deps 2021-06-20 18:46:46 -05:00
Umputun
e4385240d4 sign checksum file #95 2021-06-20 18:46:09 -05:00
Umputun
4fce9c412b don't hide options 2021-06-19 16:35:31 -05:00
Umputun
510b7f1c31 extend readme bullet points 2021-06-12 13:31:47 -05:00
Umputun
13c70eb8e8 add health integration test 2021-06-12 13:26:42 -05:00
dependabot[bot]
9fc8c4d5ba Bump normalize-url from 4.5.0 to 4.5.1 in /site
Bumps [normalize-url](https://github.com/sindresorhus/normalize-url) from 4.5.0 to 4.5.1.
- [Release notes](https://github.com/sindresorhus/normalize-url/releases)
- [Commits](https://github.com/sindresorhus/normalize-url/commits)

---
updated-dependencies:
- dependency-name: normalize-url
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-12 01:20:00 -05:00
Umputun
503f0b6dca drop regex group in source priority sorting #89 2021-06-08 15:32:35 -05:00
Umputun
22dc84b924 move compose specific to its own section 2021-06-08 12:31:23 -05:00
Umputun
297612e7c4 add test 2021-06-08 03:53:16 -05:00
Umputun
247cf13016 fix static match / without webroot defined 2021-06-08 03:48:37 -05:00