Compare commits

...

92 Commits

Author SHA1 Message Date
c851aad4f2 hotfix for the release error 2024-03-17 11:39:51 +04:00
0c7e766f93 build(deps): bump golangci/golangci-lint-action from 3 to 4 (#268) 2024-03-16 16:46:45 +00:00
4d9db28c78 Merge pull request #270 from tarampampam/dependabot/go_modules/github.com/fasthttp/router-1.5.0
build(deps): bump github.com/fasthttp/router from 1.4.22 to 1.5.0
2024-03-16 15:11:55 +00:00
1c6c35c1db build(deps): bump github.com/fasthttp/router from 1.4.22 to 1.5.0
Bumps [github.com/fasthttp/router](https://github.com/fasthttp/router) from 1.4.22 to 1.5.0.
- [Release notes](https://github.com/fasthttp/router/releases)
- [Commits](https://github.com/fasthttp/router/compare/v1.4.22...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/fasthttp/router
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-16 15:11:42 +00:00
ed8303a1a6 Merge pull request #269 from tarampampam/dependabot/github_actions/aquasecurity/trivy-action-0.18.0
build(deps): bump aquasecurity/trivy-action from 0.16.1 to 0.18.0
2024-03-01 22:38:56 +00:00
db7969d4bc build(deps): bump aquasecurity/trivy-action from 0.16.1 to 0.18.0
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.16.1 to 0.18.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](https://github.com/aquasecurity/trivy-action/compare/0.16.1...0.18.0)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 22:38:41 +00:00
0b0b0c2bca Merge pull request #267 from tarampampam/dependabot/go_modules/github.com/valyala/fasthttp-1.52.0
build(deps): bump github.com/valyala/fasthttp from 1.51.0 to 1.52.0
2024-03-01 22:08:47 +00:00
5b23d767c7 build(deps): bump github.com/valyala/fasthttp from 1.51.0 to 1.52.0
Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.51.0 to 1.52.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](https://github.com/valyala/fasthttp/compare/v1.51.0...v1.52.0)

---
updated-dependencies:
- dependency-name: github.com/valyala/fasthttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 22:08:32 +00:00
8065125526 Merge pull request #265 from tarampampam/dependabot/go_modules/github.com/stretchr/testify-1.9.0
build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0
2024-03-01 22:08:16 +00:00
ba5faed23c build(deps): bump github.com/stretchr/testify from 1.8.4 to 1.9.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.4 to 1.9.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.4...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 22:08:05 +00:00
5c9ffba5de Merge pull request #266 from tarampampam/dependabot/go_modules/github.com/prometheus/client_model-0.6.0
build(deps): bump github.com/prometheus/client_model from 0.5.0 to 0.6.0
2024-03-01 22:07:46 +00:00
5697f2c1a2 build(deps): bump github.com/prometheus/client_model from 0.5.0 to 0.6.0
Bumps [github.com/prometheus/client_model](https://github.com/prometheus/client_model) from 0.5.0 to 0.6.0.
- [Release notes](https://github.com/prometheus/client_model/releases)
- [Commits](https://github.com/prometheus/client_model/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_model
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 22:07:33 +00:00
b477db7af0 Merge pull request #264 from tarampampam/dependabot/go_modules/github.com/prometheus/client_golang-1.19.0
build(deps): bump github.com/prometheus/client_golang from 1.18.0 to 1.19.0
2024-03-01 22:06:48 +00:00
cc0b862c5a Merge pull request #263 from tarampampam/dependabot/go_modules/go.uber.org/zap-1.27.0
build(deps): bump go.uber.org/zap from 1.26.0 to 1.27.0
2024-03-01 22:06:42 +00:00
46a8b0002e build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.18.0 to 1.19.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.19.0/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.18.0...v1.19.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 22:06:36 +00:00
544ae0c7ab build(deps): bump go.uber.org/zap from 1.26.0 to 1.27.0
Bumps [go.uber.org/zap](https://github.com/uber-go/zap) from 1.26.0 to 1.27.0.
- [Release notes](https://github.com/uber-go/zap/releases)
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/zap/compare/v1.26.0...v1.27.0)

---
updated-dependencies:
- dependency-name: go.uber.org/zap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 22:06:30 +00:00
8dfc68dd6f Merge pull request #262 from tarampampam/dependabot/docker/golang-1.22-bullseye
build(deps): bump golang from 1.21-bullseye to 1.22-bullseye
2024-03-01 22:02:06 +00:00
7beea7b5a8 build(deps): bump golang from 1.21-bullseye to 1.22-bullseye
Bumps golang from 1.21-bullseye to 1.22-bullseye.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 22:01:50 +00:00
b848ea7525 chore(deps): update golangci/golangci-lint docker tag to v1.56 (#261)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-08 09:57:10 +04:00
e9b7884daf build(deps): bump codecov/codecov-action from 3 to 4 (#260) 2024-02-01 22:48:40 +00:00
b8b58fc129 build(deps): bump peter-evans/dockerhub-description from 3 to 4 (#258) 2024-02-01 22:48:26 +00:00
f49da87a1f Merge pull request #259 from tarampampam/dependabot/github_actions/aquasecurity/trivy-action-0.16.1
build(deps): bump aquasecurity/trivy-action from 0.16.0 to 0.16.1
2024-02-01 22:17:35 +00:00
bff018f66a build(deps): bump aquasecurity/trivy-action from 0.16.0 to 0.16.1
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.16.0 to 0.16.1.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](https://github.com/aquasecurity/trivy-action/compare/0.16.0...0.16.1)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 22:17:21 +00:00
b8f9608992 build(deps): bump actions/upload-artifact from 3 to 4 (#252) 2024-01-02 08:15:22 +00:00
f22855fee6 build(deps): bump github/codeql-action from 2 to 3 (#251) 2024-01-02 08:12:55 +00:00
b2231cb97c build(deps): bump actions/download-artifact from 3 to 4 (#253)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-02 12:07:20 +04:00
759f70d1f0 Merge pull request #255 from tarampampam/dependabot/go_modules/github.com/prometheus/client_golang-1.18.0
build(deps): bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0
2024-01-01 22:35:50 +00:00
5b74eaa3de build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.17.0 to 1.18.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.17.0...v1.18.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 22:35:37 +00:00
3eb8343ade Merge pull request #254 from tarampampam/dependabot/go_modules/github.com/urfave/cli/v2-2.27.1
build(deps): bump github.com/urfave/cli/v2 from 2.25.7 to 2.27.1
2024-01-01 22:34:59 +00:00
71b50da264 build(deps): bump github.com/urfave/cli/v2 from 2.25.7 to 2.27.1
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.25.7 to 2.27.1.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.25.7...v2.27.1)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 22:34:46 +00:00
1354854ba9 Merge pull request #250 from tarampampam/dependabot/github_actions/aquasecurity/trivy-action-0.16.0
build(deps): bump aquasecurity/trivy-action from 0.14.0 to 0.16.0
2024-01-01 22:25:11 +00:00
1c91c2b2fa build(deps): bump aquasecurity/trivy-action from 0.14.0 to 0.16.0
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.14.0 to 0.16.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](https://github.com/aquasecurity/trivy-action/compare/0.14.0...0.16.0)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-01 22:24:59 +00:00
c289f2cb97 Merge pull request #248 from tarampampam/dependabot/go_modules/github.com/fatih/color-1.16.0
build(deps): bump github.com/fatih/color from 1.15.0 to 1.16.0
2023-12-01 22:36:28 +00:00
29771b9188 build(deps): bump github.com/fatih/color from 1.15.0 to 1.16.0
Bumps [github.com/fatih/color](https://github.com/fatih/color) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/fatih/color/releases)
- [Commits](https://github.com/fatih/color/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/fatih/color
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 22:36:13 +00:00
5deada7d6b Merge pull request #249 from tarampampam/dependabot/go_modules/github.com/valyala/fasthttp-1.51.0
build(deps): bump github.com/valyala/fasthttp from 1.50.0 to 1.51.0
2023-12-01 22:35:26 +00:00
99694d43e1 Merge pull request #247 from tarampampam/dependabot/go_modules/github.com/fasthttp/router-1.4.22
build(deps): bump github.com/fasthttp/router from 1.4.21 to 1.4.22
2023-12-01 22:35:16 +00:00
0d2418f8aa build(deps): bump github.com/valyala/fasthttp from 1.50.0 to 1.51.0
Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.50.0 to 1.51.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](https://github.com/valyala/fasthttp/compare/v1.50.0...v1.51.0)

---
updated-dependencies:
- dependency-name: github.com/valyala/fasthttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 22:35:14 +00:00
afdf0543b7 build(deps): bump github.com/fasthttp/router from 1.4.21 to 1.4.22
Bumps [github.com/fasthttp/router](https://github.com/fasthttp/router) from 1.4.21 to 1.4.22.
- [Release notes](https://github.com/fasthttp/router/releases)
- [Commits](https://github.com/fasthttp/router/compare/v1.4.21...v1.4.22)

---
updated-dependencies:
- dependency-name: github.com/fasthttp/router
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 22:35:02 +00:00
605d019a3f Merge pull request #246 from tarampampam/dependabot/github_actions/aquasecurity/trivy-action-0.14.0
build(deps): bump aquasecurity/trivy-action from 0.13.1 to 0.14.0
2023-12-01 22:19:04 +00:00
3c1f5d9a99 build(deps): bump aquasecurity/trivy-action from 0.13.1 to 0.14.0
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.13.1 to 0.14.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](https://github.com/aquasecurity/trivy-action/compare/0.13.1...0.14.0)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-01 22:18:48 +00:00
8b18d02666 Update CHANGELOG.md 2023-11-20 12:28:22 +04:00
8e7570eee3 fix: "Too big request header" (#244)
* Added environment variable and CLI parameter for adjusting the read buffer size

* Changed readBufferSize to int and some bugfixing

* Small fixes

* ci: 👷 CI system updated

* ci: 👷 CI system updated

---------

Co-authored-by: Paramtamtam <7326800+tarampampam@users.noreply.github.com>
2023-11-20 12:27:40 +04:00
2c8ba9c0f3 build(deps): bump github.com/prometheus/client_model (#241) 2023-11-02 05:14:07 +00:00
1ab0973011 build(deps): bump github.com/fasthttp/router from 1.4.20 to 1.4.21 (#242) 2023-11-02 05:13:41 +00:00
540139db3a chore(deps): update golangci/golangci-lint docker tag to v1.55 (#239)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-02 09:13:02 +04:00
ff3d16d294 Merge pull request #243 from tarampampam/dependabot/github_actions/aquasecurity/trivy-action-0.13.1
build(deps): bump aquasecurity/trivy-action from 0.12.0 to 0.13.1
2023-11-01 22:55:13 +00:00
ebbded51bf build(deps): bump aquasecurity/trivy-action from 0.12.0 to 0.13.1
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.12.0 to 0.13.1.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](https://github.com/aquasecurity/trivy-action/compare/0.12.0...0.13.1)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 22:54:59 +00:00
384e45ce7f Merge pull request #240 from tarampampam/dependabot/go_modules/go.uber.org/goleak-1.3.0
build(deps): bump go.uber.org/goleak from 1.2.1 to 1.3.0
2023-11-01 22:19:14 +00:00
cdac8665de build(deps): bump go.uber.org/goleak from 1.2.1 to 1.3.0
Bumps [go.uber.org/goleak](https://github.com/uber-go/goleak) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/uber-go/goleak/releases)
- [Changelog](https://github.com/uber-go/goleak/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uber-go/goleak/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: go.uber.org/goleak
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-01 22:18:58 +00:00
fac512bd74 Fix spanish translated tags (#237) 2023-10-10 15:10:11 +04:00
ea85191d9e build(deps): bump actions/checkout from 3 to 4 (#232) 2023-10-09 12:46:36 +00:00
38ce1f9cf3 build(deps): bump docker/build-push-action from 4 to 5 (#234) 2023-10-09 12:46:25 +00:00
9e4a1451f5 build(deps): bump docker/setup-qemu-action from 2 to 3 (#235) 2023-10-09 12:42:41 +00:00
9feca1f509 Update dependabot.yml 2023-10-05 11:15:01 +04:00
38bf4abc1e Update dependabot.yml 2023-10-02 12:30:56 +04:00
ffc2af1c27 Update dependabot.yml 2023-10-02 11:35:41 +04:00
763c4ad109 build(deps): bump github.com/valyala/fasthttp from 1.49.0 to 1.50.0 (#227) 2023-10-02 07:07:00 +00:00
dcfd8ab3a7 build(deps): bump go.uber.org/zap from 1.25.0 to 1.26.0 (#229) 2023-10-02 06:54:19 +00:00
62f309cefd build(deps): bump docker/login-action from 2 to 3 (#233) 2023-10-02 06:53:40 +00:00
b5504de6d8 build(deps): bump github.com/prometheus/client_golang (#228) 2023-10-02 06:49:50 +00:00
4d91e17273 build(deps): bump aquasecurity/trivy-action from 0.11.2 to 0.12.0 (#230) 2023-10-02 06:49:03 +00:00
86e182c25d build(deps): bump docker/setup-buildx-action from 2 to 3 (#231) 2023-10-02 06:48:39 +00:00
8006cce4b0 Polish translation added. (#226)
* Polish translation added.

* Update CHANGELOG.md

* Update CHANGELOG.md

---------

Co-authored-by: Pаramtamtām <7326800+tarampampam@users.noreply.github.com>
2023-09-28 10:51:55 +04:00
caf4e33193 Update l10n.js (#225) 2023-09-24 21:11:49 -07:00
7ab0fa6f23 chore: The docker environment is refactored 2023-09-03 20:17:07 +04:00
81570b42c0 chore: The docker environment is refactored 2023-09-03 20:16:50 +04:00
4c3ebc055d Update CHANGELOG.md 2023-09-02 07:17:47 -07:00
61c1958717 build(deps): bump golang from 1.20-alpine to 1.21-alpine (#222)
* build(deps): bump golang from 1.20-alpine to 1.21-alpine

Bumps golang from 1.20-alpine to 1.21-alpine.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* wip: 🔕 temporary commit

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Paramtamtam <7326800+tarampampam@users.noreply.github.com>
2023-09-02 07:17:15 -07:00
3ab1a23ac5 Create dependabot.yml 2023-09-02 06:46:02 -07:00
a81c780e1e build(deps): bump go.uber.org/zap from 1.24.0 to 1.25.0 (#221) 2023-09-02 12:59:52 +00:00
2baeb2eb5b build(deps): bump github.com/valyala/fasthttp from 1.48.0 to 1.49.0 (#220) 2023-09-02 12:54:58 +00:00
e6b011b41b Add Indonesian translation (#218)
* Add Indonesian

Add all strings in bahasa indonesia.

* Update README.md

Add Indonesian flag emoji

* Add Indonesian language credit

* Update CHANGELOG.md (add 🇮🇩  language)

* Update l10n/l10n.js

---------

Co-authored-by: Pаramtamtām <7326800+tarampampam@users.noreply.github.com>
2023-09-01 10:25:17 +04:00
308467006b Add CatchAll functionality (#217)
* Add CatchAll functionality

* Added link to PR to changelog
2023-09-01 10:17:11 +04:00
ecf1359336 chore(deps): update golangci/golangci-lint docker tag to v1.54 (#215)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-09 21:09:41 +04:00
a12dc4882e build(deps): bump github.com/fasthttp/router from 1.4.19 to 1.4.20 (#213) 2023-08-02 06:39:59 +00:00
980d0a5810 build(deps): bump go.uber.org/automaxprocs from 1.5.2 to 1.5.3 (#214) 2023-08-02 06:38:58 +00:00
eb3d84ee9d Change Ukrainian translation (#211)
* Update l10n.js

* Update l10n.js
2023-07-24 17:16:52 +04:00
6b43057333 build(deps): bump github.com/valyala/fasthttp from 1.47.0 to 1.48.0 (#208) 2023-07-01 23:48:11 +00:00
071ded0eac build(deps): bump github.com/prometheus/client_golang (#210) 2023-07-01 23:47:44 +00:00
47c4338c9e build(deps): bump aquasecurity/trivy-action from 0.10.0 to 0.11.2 (#207) 2023-07-01 23:43:11 +00:00
dfdeea4b6c build(deps): bump github.com/urfave/cli/v2 from 2.25.5 to 2.25.7 (#209) 2023-07-01 23:42:31 +00:00
cbb7936149 chore(deps): update golangci/golangci-lint docker tag to v1.53 (#200)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-04 01:32:57 -07:00
c08e1307e8 build(deps): bump github.com/urfave/cli/v2 from 2.25.3 to 2.25.5 (#201) 2023-06-04 08:29:11 +00:00
25b86a057f build(deps): bump github.com/prometheus/client_model from 0.3.0 to 0.4.0 (#203) 2023-06-04 08:24:31 +00:00
ef72fa405d build(deps): bump github.com/fasthttp/router from 1.4.18 to 1.4.19 (#202) 2023-06-04 08:24:25 +00:00
1eb773fb57 depguard disabled 2023-06-04 01:18:45 -07:00
439b6d0326 build(deps): bump github.com/prometheus/client_golang (#199) 2023-06-02 06:35:01 +00:00
ef0081f711 build(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.4 (#198) 2023-06-02 06:34:58 +00:00
8c7a24b3d7 build(deps): bump github.com/urfave/cli/v2 from 2.25.1 to 2.25.3 (#197) 2023-05-04 11:20:25 +00:00
c76026c9f1 build(deps): bump github.com/prometheus/client_golang (#196) 2023-05-02 03:46:37 +00:00
37e4ecbf47 build(deps): bump aquasecurity/trivy-action from 0.9.2 to 0.10.0 (#194) 2023-05-02 03:46:24 +00:00
58dc38f72e build(deps): bump github.com/valyala/fasthttp from 1.45.0 to 1.47.0 (#195) 2023-05-02 03:46:09 +00:00
30 changed files with 447 additions and 216 deletions

View File

@ -6,17 +6,14 @@ updates:
- package-ecosystem: gomod
directory: /
schedule: {interval: monthly}
reviewers: [tarampampam]
assignees: [tarampampam]
- package-ecosystem: github-actions
directory: /
schedule: {interval: monthly}
reviewers: [tarampampam]
assignees: [tarampampam]
- package-ecosystem: docker
directory: /
schedule: {interval: monthly}
reviewers: [tarampampam]
assignees: [tarampampam]

25
.github/workflows/dependabot.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: dependabot
on:
pull_request: {}
permissions:
contents: write
pull-requests: write
jobs:
dependabot: # https://tinyurl.com/e69djmen
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: dependabot/fetch-metadata@v1
id: metadata
with: {github-token: "${{ secrets.GITHUB_TOKEN }}"}
- name: Enable auto-merge for Dependabot PRs
if: ${{ contains(fromJSON('["version-update:semver-minor", "version-update:semver-patch"]'), steps.metadata.outputs.update-type) }}
run: gh pr merge --auto --merge "$PR_URL"
continue-on-error: true
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -10,9 +10,9 @@ jobs:
name: Docker Hub Description
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: peter-evans/dockerhub-description@v3 # Action page: <https://github.com/peter-evans/dockerhub-description>
- uses: peter-evans/dockerhub-description@v4 # Action page: <https://github.com/peter-evans/dockerhub-description>
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_USER_PASSWORD }}

View File

@ -26,7 +26,7 @@ jobs:
os: [linux, darwin] # linux, freebsd, darwin, windows
arch: [amd64] # amd64, 386
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: gacts/setup-go-with-cache@v1
with: {go-version-file: go.mod}
@ -57,31 +57,31 @@ jobs:
name: Build docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- {uses: gacts/github-slug@v1, id: slug}
- uses: docker/setup-qemu-action@v2 # Action page: <https://github.com/docker/setup-qemu-action>
- uses: docker/setup-qemu-action@v3 # Action page: <https://github.com/docker/setup-qemu-action>
- uses: docker/setup-buildx-action@v2 # Action page: <https://github.com/docker/setup-buildx-action>
- uses: docker/setup-buildx-action@v3 # Action page: <https://github.com/docker/setup-buildx-action>
- uses: docker/login-action@v2 # Action page: <https://github.com/docker/login-action>
- uses: docker/login-action@v3 # Action page: <https://github.com/docker/login-action>
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: docker/login-action@v2 # Action page: <https://github.com/docker/login-action>
- uses: docker/login-action@v3 # Action page: <https://github.com/docker/login-action>
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v4 # Action page: <https://github.com/docker/build-push-action>
- uses: docker/build-push-action@v5 # Action page: <https://github.com/docker/build-push-action>
with:
context: .
file: Dockerfile
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v6,linux/arm/v7
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm64/v8
build-args: "APP_VERSION=${{ steps.slug.outputs.version }}"
tags: |
tarampampam/error-pages:${{ steps.slug.outputs.version }}

View File

@ -17,7 +17,7 @@ jobs: # Docs: <https://git.io/JvxXE>
name: Gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with: {fetch-depth: 0}
- name: Check for GitLeaks
@ -27,19 +27,19 @@ jobs: # Docs: <https://git.io/JvxXE>
name: Golang-CI (lint)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: gacts/setup-go-with-cache@v1
with: {go-version: 1.19}
with: {go-version-file: go.mod}
- uses: golangci/golangci-lint-action@v3
- uses: golangci/golangci-lint-action@v4
with: {skip-pkg-cache: true, skip-build-cache: true}
validate-config-file:
name: Validate config file
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: gacts/setup-node-with-cache@v1
with: {node-version: 16}
@ -54,7 +54,7 @@ jobs: # Docs: <https://git.io/JvxXE>
name: Lint l10n file(s)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: gacts/setup-node-with-cache@v1
with: {node-version: 16}
@ -70,7 +70,7 @@ jobs: # Docs: <https://git.io/JvxXE>
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with: {fetch-depth: 2} # Fixes codecov error 'Issue detecting commit SHA'
- uses: gacts/setup-go-with-cache@v1
@ -79,7 +79,7 @@ jobs: # Docs: <https://git.io/JvxXE>
- name: Run Unit tests
run: go test -race -covermode=atomic -coverprofile /tmp/coverage.txt ./...
- uses: codecov/codecov-action@v3 # https://github.com/codecov/codecov-action
- uses: codecov/codecov-action@v4 # https://github.com/codecov/codecov-action
continue-on-error: true
with:
file: /tmp/coverage.txt
@ -95,7 +95,7 @@ jobs: # Docs: <https://git.io/JvxXE>
arch: [amd64] # amd64, 386
needs: [golangci-lint, go-test, validate-config-file]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: gacts/setup-go-with-cache@v1
with: {go-version-file: go.mod}
@ -114,7 +114,7 @@ jobs: # Docs: <https://git.io/JvxXE>
if: matrix.os == 'linux'
run: ./error-pages --version && ./error-pages -h
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: error-pages-${{ matrix.os }}-${{ matrix.arch }}
path: error-pages
@ -126,9 +126,9 @@ jobs: # Docs: <https://git.io/JvxXE>
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: error-pages-linux-amd64
path: .artifact
@ -161,11 +161,11 @@ jobs: # Docs: <https://git.io/JvxXE>
runs-on: ubuntu-latest
needs: [golangci-lint, go-test, validate-config-file]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- {uses: gacts/github-slug@v1, id: slug}
- uses: docker/build-push-action@v4 # Action page: <https://github.com/docker/build-push-action>
- uses: docker/build-push-action@v5 # Action page: <https://github.com/docker/build-push-action>
with:
context: .
file: Dockerfile
@ -175,7 +175,7 @@ jobs: # Docs: <https://git.io/JvxXE>
- run: docker save app:ci > ./docker-image.tar
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: docker-image
path: ./docker-image.tar
@ -186,14 +186,14 @@ jobs: # Docs: <https://git.io/JvxXE>
runs-on: ubuntu-latest
needs: [docker-image]
steps:
- uses: actions/checkout@v3 # is needed for `upload-sarif` action
- uses: actions/checkout@v4 # is needed for `upload-sarif` action
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: docker-image
path: .artifact
- uses: aquasecurity/trivy-action@0.9.2 # action page: <https://github.com/aquasecurity/trivy-action>
- uses: aquasecurity/trivy-action@0.18.0 # action page: <https://github.com/aquasecurity/trivy-action>
with:
input: .artifact/docker-image.tar
format: sarif
@ -201,7 +201,7 @@ jobs: # Docs: <https://git.io/JvxXE>
exit-code: 1
output: trivy-results.sarif
- uses: github/codeql-action/upload-sarif@v2
- uses: github/codeql-action/upload-sarif@v3
if: always()
continue-on-error: true
with: {sarif_file: trivy-results.sarif}
@ -212,9 +212,9 @@ jobs: # Docs: <https://git.io/JvxXE>
needs: [docker-image]
timeout-minutes: 2
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: docker-image
path: .artifact

View File

@ -43,7 +43,6 @@ linters: # All available linters list: <https://golangci-lint.run/usage/linters/
enable:
- asciicheck # Simple linter to check that your code does not contain non-ASCII identifiers
- bidichk # Checks for dangerous unicode character sequences
- depguard # Go linter that checks if package imports are in a list of acceptable packages
- dogsled # Checks assignments with too many blank identifiers (e.g. x, _, _, _, := f())
- dupl # Tool for code clone detection
- errcheck # Errcheck is a program for checking for unchecked errors in go programs. These unchecked errors can be critical bugs in some cases

View File

@ -4,6 +4,35 @@ All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].
## v2.27.0
### Changed
- Go updated from `1.21` up to `1.22`
- Go dependencies updated
## v2.26.0
### Added
- Error pages now translated into 🇵🇱 [#226]
- Possibility to set custom read buffer size (using `--read-buffer-size` flag or environment variable `READ_BUFFER_SIZE`) [#238], [#244]
[#226]:https://github.com/tarampampam/error-pages/pull/226
[#238]:https://github.com/tarampampam/error-pages/issues/238
[#244]:https://github.com/tarampampam/error-pages/pull/244
## v2.25.0
### Added
- Go updated from `1.20` up to `1.21`
- Error pages now translated into 🇮🇩 [#218]
- Possibility catch all paths with error page 404 (using `--catch-all` flag for the `serve` or environment variable `CATCH_ALL=true`) [#217]
[#218]:https://github.com/tarampampam/error-pages/pull/218
[#217]:https://github.com/tarampampam/error-pages/issues/217
## v2.24.0
### Added

View File

@ -1,7 +1,17 @@
# syntax=docker/dockerfile:1.2
# syntax=docker/dockerfile:1
# Image page: <https://hub.docker.com/_/golang>
FROM golang:1.20-alpine as builder
# this stage is used to build the application
FROM docker.io/library/golang:1.22-bookworm AS builder
COPY ./go.* /src/
WORKDIR /src
# burn the modules cache
RUN go mod download
# this stage is used to compile the application
FROM builder AS compiler
# can be passed with any prefix (like `v1.2.3@GITHASH`), e.g.: `docker build --build-arg "APP_VERSION=v1.2.3@GITHASH" .`
ARG APP_VERSION="undefined@docker"
@ -13,8 +23,8 @@ COPY . .
# arguments to pass on each go tool link invocation
ENV LDFLAGS="-s -w -X gh.tarampamp.am/error-pages/internal/version.version=$APP_VERSION"
# build the application
RUN set -x \
&& go version \
&& CGO_ENABLED=0 go build -trimpath -ldflags "$LDFLAGS" -o ./error-pages ./cmd/error-pages/ \
&& ./error-pages --version \
&& ./error-pages -h
@ -42,7 +52,7 @@ RUN set -x \
&& ls -l ./html
# use empty filesystem
FROM scratch as runtime
FROM scratch AS runtime
ARG APP_VERSION="undefined@docker"
@ -57,7 +67,7 @@ LABEL \
org.opencontainers.image.licenses="MIT"
# Import from builder
COPY --from=builder /tmp/rootfs /
COPY --from=compiler /tmp/rootfs /
# Use an unprivileged user
USER 10001:10001
@ -69,7 +79,8 @@ ENV LISTEN_PORT="8080" \
DEFAULT_ERROR_PAGE="404" \
DEFAULT_HTTP_CODE="404" \
SHOW_DETAILS="false" \
DISABLE_L10N="false"
DISABLE_L10N="false" \
READ_BUFFER_SIZE="2048"
# Docs: <https://docs.docker.com/engine/reference/builder/#healthcheck>
HEALTHCHECK --interval=7s --timeout=2s CMD ["/bin/error-pages", "--log-json", "healthcheck"]

View File

@ -37,7 +37,7 @@ One day you may want to replace the standard error pages of your HTTP server wit
- Error pages can be [embedded into your own `nginx`][wiki-usage-with-nginx] docker image
- Fully configurable (take a look at the [configuration file](https://github.com/tarampampam/error-pages/blob/master/error-pages.yml) and [project Wiki][wiki])
- Distributed using docker image and compiled binary files
- Localized (🇺🇸, 🇫🇷, 🇺🇦, 🇷🇺, 🇵🇹, 🇳🇱, 🇩🇪, 🇪🇸, 🇨🇳) HTML error pages (translation process [described here](https://github.com/tarampampam/error-pages/tree/master/l10n) - other translations are welcome!)
- Localized (🇺🇸, 🇫🇷, 🇺🇦, 🇷🇺, 🇵🇹, 🇳🇱, 🇩🇪, 🇪🇸, 🇨🇳, 🇮🇩, 🇵🇱) HTML error pages (translation process [described here](https://github.com/tarampampam/error-pages/tree/master/l10n) - other translations are welcome!)
## 🧩 Install

View File

@ -8,9 +8,8 @@ volumes:
golint-cache: {}
services:
app: &app-service
image: golang:1.20-buster # Image page: <https://hub.docker.com/_/golang>
working_dir: /src
app: &go
build: {target: builder}
environment:
HOME: /tmp
GOPATH: /tmp
@ -22,10 +21,10 @@ services:
security_opt: [no-new-privileges:true]
web:
<<: *app-service
<<: *go
ports:
- "8080:8080/tcp" # Open <http://127.0.0.1:8080>
command: sh -c "go build -buildvcs=false -o /tmp/app ./cmd/error-pages && /tmp/app serve --show-details --proxy-headers=X-Foo,Bar,Baz_blah"
command: sh -c "go build -buildvcs=false -o /tmp/app ./cmd/error-pages && /tmp/app serve --show-details --proxy-headers=X-Foo,Bar,Baz_blah --catch-all"
healthcheck:
test: ['CMD', '/tmp/app', '--log-json', 'healthcheck']
interval: 4s
@ -33,7 +32,7 @@ services:
retries: 5
golint:
image: golangci/golangci-lint:v1.52-alpine # Image page: <https://hub.docker.com/r/golangci/golangci-lint>
image: golangci/golangci-lint:v1.56-alpine # Image page: <https://hub.docker.com/r/golangci/golangci-lint>
environment:
GOLANGCI_LINT_CACHE: /tmp/golint # <https://github.com/golangci/golangci-lint/blob/v1.42.0/internal/cache/default.go#L68>
volumes:
@ -44,7 +43,7 @@ services:
security_opt: [no-new-privileges:true]
hurl:
image: orangeopensource/hurl:1.8.0
image: ghcr.io/orange-opensource/hurl:4.2.0
volumes:
- .:/src:ro
working_dir: /src

51
go.mod
View File

@ -1,48 +1,41 @@
module gh.tarampamp.am/error-pages
go 1.20
go 1.21
require (
github.com/a8m/envsubst v1.4.2
github.com/fasthttp/router v1.4.18
github.com/fatih/color v1.15.0
github.com/fasthttp/router v1.5.0
github.com/fatih/color v1.16.0
github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_model v0.3.0
github.com/stretchr/testify v1.8.2
github.com/urfave/cli/v2 v2.25.1
github.com/valyala/fasthttp v1.45.0
go.uber.org/automaxprocs v1.5.2
go.uber.org/goleak v1.2.1
go.uber.org/zap v1.24.0
github.com/prometheus/client_golang v1.19.0
github.com/prometheus/client_model v0.6.0
github.com/stretchr/testify v1.9.0
github.com/urfave/cli/v2 v2.27.1
github.com/valyala/fasthttp v1.52.0
go.uber.org/automaxprocs v1.5.3
go.uber.org/goleak v1.3.0
go.uber.org/zap v1.27.0
gopkg.in/yaml.v3 v3.0.1
)
require (
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/andybalholm/brotli v1.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.16.3 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/common v0.40.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
github.com/prometheus/common v0.50.0 // indirect
github.com/prometheus/procfs v0.13.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee // indirect
github.com/savsgio/gotils v0.0.0-20240303185622-093b76447511 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/sys v0.6.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/sys v0.18.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
)

133
go.sum
View File

@ -1,105 +1,96 @@
github.com/a8m/envsubst v1.4.2 h1:4yWIHXOLEJHQEFd4UjrWDrYeYlV7ncFWJOCBRLOZHQg=
github.com/a8m/envsubst v1.4.2/go.mod h1:MVUTQNGQ3tsjOOtKCNd+fl8RzhsXcDvvAEzkhGtlsbY=
github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs=
github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/cpuguy83/go-md2man/v2 v2.0.3 h1:qMCsGGgs+MAzDFyp9LpAe1Lqy/fY/qCovCm0qnXZOBM=
github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fasthttp/router v1.4.18 h1:elMnlFq527oZd8MHsuUpO6uLDup1exv8rXPfIjClDHk=
github.com/fasthttp/router v1.4.18/go.mod h1:ZmC20Mn0VgCBbUWFDmnYzFbQYRfdGeKgpkBy0+JioKA=
github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs=
github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
github.com/fasthttp/router v1.5.0 h1:3Qbbo27HAPzwbpRzgiV5V9+2faPkPt3eNuRaDV6LYDA=
github.com/fasthttp/router v1.5.0/go.mod h1:FddcKNXFZg1imHcy+uKB0oo/o6yE9zD3wNguqlhWDak=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d h1:cVtBfNW5XTHiKQe7jDaDBSh/EVM4XLPutLAGboIXuM0=
github.com/kami-zh/go-capturer v0.0.0-20171211120116-e492ea43421d/go.mod h1:P2viExyCEfeWGU259JnaQ34Inuec4R38JCyBx2edgD0=
github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY=
github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2eRGjI=
github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=
github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng=
github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw=
github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y=
github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4=
github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w=
github.com/prometheus/common v0.40.0 h1:Afz7EVRqGg2Mqqf4JuF9vdvp1pi220m55Pi9T2JnO4Q=
github.com/prometheus/common v0.40.0/go.mod h1:L65ZJPSmfn/UBWLQIHV7dBrKFidB/wPlF1y5TlSt9OE=
github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI=
github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY=
github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
github.com/prometheus/client_golang v1.19.0 h1:ygXvpU1AoN1MhdzckN+PyD9QJOSD4x7kmXYlnfbA6JU=
github.com/prometheus/client_golang v1.19.0/go.mod h1:ZRM9uEAypZakd+q/x7+gmsvXdURP+DABIEIjnmDdp+k=
github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos=
github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8=
github.com/prometheus/common v0.48.0 h1:QO8U2CdOzSn1BBsmXJXduaaW+dY/5QLjfB8svtSzKKE=
github.com/prometheus/common v0.48.0/go.mod h1:0/KsvlIEfPQCQ5I2iNSAWKPZziNCvRs5EC6ILDTlAPc=
github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ=
github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ=
github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo=
github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo=
github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o=
github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee h1:8Iv5m6xEo1NR1AvpV+7XmhI4r39LGNzwUL4YpMuL5vk=
github.com/savsgio/gotils v0.0.0-20230208104028-c358bd845dee/go.mod h1:qwtSXrKuJh/zsFQ12yEE89xfCrGKK63Rr7ctU/uCo4g=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/urfave/cli/v2 v2.25.1 h1:zw8dSP7ghX0Gmm8vugrs6q9Ku0wzweqPyshy+syu9Gw=
github.com/urfave/cli/v2 v2.25.1/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc=
github.com/savsgio/gotils v0.0.0-20240303185622-093b76447511 h1:KanIMPX0QdEdB4R3CiimCAbxFrhB3j7h0/OvpYGVQa8=
github.com/savsgio/gotils v0.0.0-20240303185622-093b76447511/go.mod h1:sM7Mt7uEoCeFSCBM+qBrqvEo+/9vdmj19wzp3yzUhmg=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/urfave/cli/v2 v2.27.1 h1:8xSQ6szndafKVRmfyeUMxkNUJQMjL1F2zmsZ+qHpfho=
github.com/urfave/cli/v2 v2.27.1/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.45.0 h1:zPkkzpIn8tdHZUrVa6PzYd0i5verqiPSkgTd3bSUcpA=
github.com/valyala/fasthttp v1.45.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA=
github.com/valyala/fasthttp v1.52.0 h1:wqBQpxH71XW0e2g+Og4dzQM8pk34aFYlA1Ga8db7gU0=
github.com/valyala/fasthttp v1.52.0/go.mod h1:hf5C4QnVMkNXMspnsUlfM3WitlgYflyhHYoKol/szxQ=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ=
go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/automaxprocs v1.5.2 h1:2LxUOGiR3O6tw8ui5sZa2LAaHnsviZdVOUZw4fvbnME=
go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0=
go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A=
go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4=
go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 h1:+qGGcbkzsfDQNPPe9UDgpxAWQrhbbBXOYJFQDq/dtJw=
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913/go.mod h1:4aEEwZQutDLsQv2Deui4iYQ6DWTxR14g6m8Wv88+Xqk=
go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8=
go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ=
go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

View File

@ -32,6 +32,8 @@ const (
showDetailsFlagName = "show-details"
proxyHTTPHeadersFlagName = "proxy-headers"
disableL10nFlagName = "disable-l10n"
catchAllFlagName = "catch-all"
readBufferSizeFlagName = "read-buffer-size"
)
const (
@ -76,6 +78,7 @@ func NewCommand(log *zap.Logger) *cli.Command { //nolint:funlen
o.Default.PageCode = c.String(defaultErrorPageFlagName)
o.Default.HTTPCode = uint16(c.Uint(defaultHTTPCodeFlagName))
o.ShowDetails = c.Bool(showDetailsFlagName)
o.CatchAll = c.Bool(catchAllFlagName)
if headers := c.String(proxyHTTPHeadersFlagName); headers != "" { //nolint:nestif
var m = make(map[string]struct{})
@ -105,7 +108,7 @@ func NewCommand(log *zap.Logger) *cli.Command { //nolint:funlen
return fmt.Errorf("wrong default HTTP response code [%d]", o.Default.HTTPCode)
}
return cmd.Run(c.Context, log, cfg, ip, port, o)
return cmd.Run(c.Context, log, cfg, ip, port, c.Uint(readBufferSizeFlagName), o)
},
Flags: []cli.Flag{
shared.ConfigFileFlag,
@ -151,6 +154,16 @@ func NewCommand(log *zap.Logger) *cli.Command { //nolint:funlen
Usage: "disable error pages localization",
EnvVars: []string{env.DisableL10n.String()},
},
&cli.BoolFlag{
Name: catchAllFlagName,
Usage: "catch all pages",
EnvVars: []string{env.CatchAll.String()},
},
&cli.UintFlag{
Name: readBufferSizeFlagName,
Usage: "read buffer size (0 = use default value)",
EnvVars: []string{env.ReadBufferSize.String()},
},
},
}
@ -159,7 +172,13 @@ func NewCommand(log *zap.Logger) *cli.Command { //nolint:funlen
// Run current command.
func (cmd *command) Run( //nolint:funlen
parentCtx context.Context, log *zap.Logger, cfg *config.Config, ip string, port uint16, opt options.ErrorPage,
parentCtx context.Context,
log *zap.Logger,
cfg *config.Config,
ip string,
port uint16,
readBufferSize uint,
opt options.ErrorPage,
) error {
var (
ctx, cancel = context.WithCancel(parentCtx) // serve context creation
@ -219,7 +238,7 @@ func (cmd *command) Run( //nolint:funlen
}
// create HTTP server
server := appHttp.NewServer(log)
server := appHttp.NewServer(log, readBufferSize)
// register server routes, middlewares, etc.
if err := server.Register(cfg, picker, opt); err != nil {
@ -232,7 +251,7 @@ func (cmd *command) Run( //nolint:funlen
go func(errCh chan<- error) {
defer close(errCh)
log.Info("Server starting",
var fields = []zap.Field{
zap.String("addr", ip),
zap.Uint16("port", port),
zap.String("default error page", opt.Default.PageCode),
@ -240,7 +259,14 @@ func (cmd *command) Run( //nolint:funlen
zap.Strings("proxy headers", opt.ProxyHTTPHeaders),
zap.Bool("show request details", opt.ShowDetails),
zap.Bool("localization disabled", opt.L10n.Disabled),
)
zap.Bool("catch all enabled", opt.CatchAll),
}
if readBufferSize > 0 {
fields = append(fields, zap.Uint("read buffer size", readBufferSize))
}
log.Info("Server starting", fields...)
if err := server.Start(ip, port); err != nil {
errCh <- err

2
internal/env/env.go vendored
View File

@ -18,6 +18,8 @@ const (
ShowDetails envVariable = "SHOW_DETAILS" // show request details in response
ProxyHTTPHeaders envVariable = "PROXY_HTTP_HEADERS" // proxy HTTP request headers list (request -> response)
DisableL10n envVariable = "DISABLE_L10N" // disable pages localization
CatchAll envVariable = "CATCH_ALL" // catch all pages
ReadBufferSize envVariable = "READ_BUFFER_SIZE" // https://github.com/tarampampam/error-pages/issues/238
)
// String returns environment variable name in the string representation.

View File

@ -17,6 +17,8 @@ func TestConstants(t *testing.T) {
assert.Equal(t, "SHOW_DETAILS", string(ShowDetails))
assert.Equal(t, "PROXY_HTTP_HEADERS", string(ProxyHTTPHeaders))
assert.Equal(t, "DISABLE_L10N", string(DisableL10n))
assert.Equal(t, "CATCH_ALL", string(CatchAll))
assert.Equal(t, "READ_BUFFER_SIZE", string(ReadBufferSize))
}
func TestEnvVariable_Lookup(t *testing.T) {
@ -32,6 +34,8 @@ func TestEnvVariable_Lookup(t *testing.T) {
{giveEnv: ShowDetails},
{giveEnv: ProxyHTTPHeaders},
{giveEnv: DisableL10n},
{giveEnv: CatchAll},
{giveEnv: ReadBufferSize},
}
for _, tt := range cases {

View File

@ -39,13 +39,14 @@ const (
defaultIdleTimeout = time.Second * 6
)
func NewServer(log *zap.Logger) Server {
func NewServer(log *zap.Logger, readBufferSize uint) Server {
rdr := tpl.NewTemplateRenderer()
return Server{
// fasthttp docs: <https://github.com/valyala/fasthttp>
fast: &fasthttp.Server{
WriteTimeout: defaultWriteTimeout,
ReadBufferSize: int(readBufferSize),
ReadTimeout: defaultReadTimeout,
IdleTimeout: defaultIdleTimeout,
NoDefaultServerHeader: true,
@ -107,7 +108,13 @@ func (s *Server) Register(cfg *config.Config, templatePicker templatePicker, opt
s.router.GET("/metrics", metricsHandler.NewHandler(reg))
// use index handler to catch all paths? Uses DEFAULT_ERROR_PAGE
if opt.CatchAll {
s.router.NotFound = indexHandler.NewHandler(cfg, templatePicker, s.rdr, opt)
} else {
// use default not found handler
s.router.NotFound = notfoundHandler.NewHandler(cfg, templatePicker, s.rdr, opt)
}
return nil
}

View File

@ -13,4 +13,5 @@ type ErrorPage struct {
}
ShowDetails bool // show request details in response
ProxyHTTPHeaders []string // proxy HTTP request headers list
CatchAll bool // catch all pages
}

View File

@ -11,6 +11,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Fehler',
es: 'Error',
zh: '错误',
id: 'Kesalahan',
pl: 'Błąd',
},
'Good luck': {
fr: 'Bonne chance',
@ -21,16 +23,20 @@ Object.defineProperty(window, 'l10n', {
de: 'Viel Glück',
es: 'Buena Suerte',
zh: '祝好运',
id: 'Semoga berhasil!',
pl: 'Powodzenia',
},
'UH OH': {
fr: 'Oups',
ru: 'Ох',
uk: 'Ох',
uk: 'Упс',
pt: 'Ops',
nl: 'Oeps',
de: 'Hoppla',
es: 'Oups',
es: 'Uy',
zh: '哎呀',
id: 'Ups',
pl: 'Ojej',
},
'Request details': {
fr: 'Détails de la requête',
@ -41,6 +47,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Details der Anfrage',
es: 'Detalles de la petición',
zh: '请求详情',
id: 'Rincian permintaan',
pl: 'Poproś o szczegóły',
},
'Double-check the URL': {
fr: 'Vérifiez lURL',
@ -51,36 +59,44 @@ Object.defineProperty(window, 'l10n', {
de: 'Überprüfen Sie die URL',
es: 'Verifique la url',
zh: '请再次检查地址',
id: 'Periksa URL',
pl: 'Sprawdź adres URL',
},
'Alternatively, go back': {
fr: 'Essayer de revenir en arrière',
ru: 'Или можете вернуться назад',
uk: 'Або ви можете повернутися',
uk: 'Або можете повернутися назад',
pt: "Como alternativa, tente voltar",
nl: 'Of ga terug',
de: 'Alternativ gehen Sie zurück',
es: 'Como alternativa, vuelva atrás',
zh: '或返回上一页',
id: 'Atau, kembali',
pl: 'Alternatywnie wróć',
},
'Here\'s what might have happened': {
fr: 'Voici ce qui aurait pu se passer',
ru: 'Из-за чего это могло случиться',
uk: 'Що це може статися',
uk: 'Ось що могло трапитися',
pt: 'Aqui está o que pode ter acontecido',
nl: 'Wat er gebeurd kan zijn',
de: 'Folgendes könnte passiert sein',
es: 'Esto es lo que ha podido pasar',
zh: '可能原因有',
id: 'Inilah yang bisa saja terjadi',
pl: 'Oto, co mogło się wydarzyć',
},
'You may have mistyped the URL': {
fr: 'Vous avez peut-être mal tapé lURL',
ru: 'Вы могли ошибиться в URL',
uk: 'Ви можете зробити помилку в URL-адресі',
uk: 'Ви могли помилитися в URL-адресі',
pt: 'Você pode ter digitado incorretamente a URL',
nl: 'De URL bevat een typefout',
de: 'Möglicherweise haben Sie die URL falsch eingegeben',
es: 'Igual ha escrito mal la URL',
es: 'Quizá ha escrito mal la URL',
zh: '您可能输入了错误的地址',
id: 'Anda mungkin tersalah memasukkan URL',
pl: 'Być może błędnie wpisałeś adres URL',
},
'The site was moved': {
fr: 'Le site a été déplacé',
@ -89,8 +105,10 @@ Object.defineProperty(window, 'l10n', {
pt: 'O site foi movido',
nl: 'De site is verplaatst',
de: 'Die Seite wurde verschoben',
es: 'El sitio se ha movido',
es: 'El sitio se ha trasladado',
zh: '站点已被转移',
id: 'Halaman dipindahkan',
pl: 'Witryna została przeniesiona',
},
'It was never here': {
fr: 'Il na jamais été ici',
@ -101,26 +119,32 @@ Object.defineProperty(window, 'l10n', {
de: 'Es war nie hier',
es: 'Nunca ha estado aquí',
zh: '站点从未存在',
id: 'Itu Tidak pernah di sini',
pl: 'Nigdy jej nie było',
},
'Bad Request': {
fr: 'Mauvaise requête',
ru: 'Некорректный запрос',
uk: 'Неправильний запит',
uk: 'Хибний запит',
pt: 'Requisição inválida',
nl: 'Foutieve anvraag',
de: 'Fehlerhafte Anfrage',
es: 'Petición inválida',
zh: '错误请求',
id: 'Permintaan yang salah',
pl: 'Nieprawidłowe żądanie',
},
'The server did not understand the request': {
fr: 'Le serveur ne comprend pas la requête',
ru: 'Сервер не смог обработать запрос из-за ошибки в нём',
uk: 'Сервер не міг обробити запит через помилку в ньому',
uk: 'Сервер не зміг обробити запит через помилку в ньому',
pt: 'O servidor não entendeu a solicitação',
nl: 'De server begreep het verzoek niet',
de: 'Der Server hat die Anfrage nicht verstanden',
es: 'El servidor no entendió la petición',
zh: '服务器不理解该请求',
id: 'Server tidak memahami permintaan',
pl: 'Serwer nie zrozumiał żądania',
},
'Unauthorized': {
fr: 'Non autorisé',
@ -131,6 +155,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Nicht autorisiert',
es: 'No autorizado',
zh: '未经授权',
id: 'Tidak diotorisasi',
pl: 'Nieautoryzowany',
},
'The requested page needs a username and a password': {
fr: 'La page demandée nécessite un nom dutilisateur et un mot de passe',
@ -141,6 +167,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Die angeforderte Seite benötigt einen Benutzernamen und ein Passwort',
es: 'La página solicitada necesita un usuario y una contraseña',
zh: '请求的页面需要用户名和密码',
id: 'Halaman yang diminta membutuhkan nama pengguna dan kata sandi',
pl: 'Żądana strona wymaga podania nazwy użytkownika i hasła',
},
'Forbidden': {
fr: 'Interdit',
@ -151,6 +179,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Verboten',
es: 'Prohibido',
zh: '禁止访问',
id: 'Dilarang',
pl: 'Zabroniony',
},
'Access is forbidden to the requested page': {
fr: 'Accès interdit à la page demandée',
@ -161,26 +191,32 @@ Object.defineProperty(window, 'l10n', {
de: 'Der Zugriff auf die angeforderte Seite ist verboten',
es: 'El acceso está prohibido para la página solicitada',
zh: '禁止访问请求的页面',
id: 'Akses dilarang ke halaman yang diminta',
pl: 'Dostęp do żądanej strony jest zabroniony',
},
'Not Found': {
fr: 'Introuvable',
ru: 'Страница не найдена',
uk: 'Сторінка не знайдена',
uk: 'Сторінку не знайдено',
pt: 'Não encontrado',
nl: 'Niet gevonden',
de: 'Nicht gefunden',
es: 'No encontrado',
zh: '未找到',
id: 'Tidak ditemukan',
pl: 'Nie znaleziono',
},
'The server can not find the requested page': {
fr: 'Le serveur ne peut trouver la page demandée',
ru: 'Сервер не смог найти запрашиваемую страницу',
uk: 'Сервер не міг знайти запитану сторінку',
uk: 'Сервер не зміг знайти запитану сторінку',
pt: 'O servidor não consegue encontrar a página solicitada',
nl: 'De server kan de pagina niet vinden',
de: 'Der Server kann die angeforderte Seite nicht finden',
es: 'El servidor no puede encontrar la página solicitada',
zh: '服务器找不到请求的页面',
id: 'Server tidak dapat menemukan halaman yang diminta',
pl: 'Serwer nie może znaleźć żądanej strony',
},
'Method Not Allowed': {
fr: 'Méthode Non Autorisée',
@ -191,6 +227,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Methode nicht erlaubt',
es: 'Método no permitido',
zh: '方法不被允许',
id: 'Metode tidak diizinkan',
pl: 'Niedozwolona metoda',
},
'The method specified in the request is not allowed': {
fr: 'La méthode spécifiée dans la requête nest pas autorisée',
@ -201,6 +239,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Die in der Anfrage angegebene Methode ist nicht zulässig',
es: 'El método especificado en la petición no está permitido',
zh: '请求指定的方法不被允许',
id: 'Metode dalam permintaan tidak diizinkan',
pl: 'Metoda określona w żądaniu jest niedozwolona',
},
'Proxy Authentication Required': {
fr: 'Authentification proxy requise',
@ -211,6 +251,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Proxy-Authentifizierung benötigt',
es: 'Autenticación de proxy requerida',
zh: '需要代理服务器身份验证',
id: 'Diperlukan otentikasi proxy',
pl: 'Wymagane uwierzytelnianie proxy',
},
'You must authenticate with a proxy server before this request can be served': {
fr: 'Vous devez vous authentifier avec un serveur proxy avant que cette requête puisse être servie',
@ -221,26 +263,32 @@ Object.defineProperty(window, 'l10n', {
de: 'Sie müssen sich bei einem Proxy-Server authentifizieren, bevor diese Anfrage bedient werden kann',
es: 'Debes autentificarte con un servidor proxy antes de que esta petición pueda ser atendida',
zh: '您必须对代理服务器进行身份验证,然后才能让请求得到处理',
id: 'Anda harus mengautentikasi dengan server proxy sebelum permintaan ini dapat dilayani',
pl: 'Musisz uwierzytelnić się na serwerze proxy, zanim to żądanie będzie mogło zostać obsłużone',
},
'Request Timeout': {
fr: 'Requête expiré',
ru: 'Истекло время ожидания',
uk: 'Час запиту закінчився',
uk: 'Вичерпано час очікування',
pt: 'Tempo limite de solicitação excedido',
nl: 'Aanvraagtijd verstreken',
de: 'Zeitüberschreitung der Anforderung',
es: 'Tiempo límite de la petición excedido',
zh: '请求超时',
id: 'Meminta batas waktu',
pl: 'Przekroczenie limitu czasu żądania',
},
'The request took longer than the server was prepared to wait': {
fr: 'La requête prend plus de temps que prévu',
ru: 'Отправка запроса заняла слишком много времени',
uk: 'Надсилання запиту зайняв занадто багато часу',
uk: 'Надсилання запиту зайняло надто багато часу',
pt: 'A solicitação demorou mais do que o servidor estava preparado para esperar',
nl: 'Het verzoek duurde langer dan de server wilde wachten',
de: 'Die Anfrage hat länger gedauert, als der Server bereit war zu warten',
es: 'La petición esta tardando más de lo que el servidor estaba preparado para esperar',
zh: '请求用时超过了服务器设置的最长等待时间',
id: 'Permintaan memakan waktu lebih lama dari yang bisa ditunggu oleh server',
pl: 'Żądanie trwało dłużej niż serwer był gotowy czekać',
},
'Conflict': {
fr: 'Conflit',
@ -251,6 +299,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Konflikt',
es: 'Conflicto',
zh: '冲突',
id: 'Konflik',
pl: 'Konflikt',
},
'The request could not be completed because of a conflict': {
fr: 'La requête na pas pu être complétée à cause dun conflit',
@ -261,6 +311,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Die Anfrage konnte aufgrund eines Konflikts nicht abgeschlossen werden',
es: 'La petición no ha podido ser completada por un conflicto',
zh: '由于冲突,请求无法完成',
id: 'Permintaan tidak dapat diselesaikan karena adanya konflik',
pl: 'Żądanie nie mogło zostać wykonane z powodu konfliktu',
},
'Gone': {
fr: 'Supprimé',
@ -271,26 +323,32 @@ Object.defineProperty(window, 'l10n', {
de: 'Verschwunden',
es: 'Eliminado',
zh: '已移除',
id: 'Menghilang',
pl: 'Usunięto',
},
'The requested page is no longer available': {
fr: 'La page demandée nest plus disponible',
ru: 'Запрошенная страница была удалена',
uk: 'Запитана сторінка була видалена',
uk: 'Запитувана сторінка більше не доступна',
pt: 'A página solicitada não está mais disponível',
nl: 'De pagina is niet langer beschikbaar',
de: 'Die angeforderte Seite ist nicht mehr verfügbar',
es: 'La página solicitada no está ya disponible',
zh: '请求的页面不再可用',
id: 'Halaman yang diminta tidak lagi tersedia',
pl: 'Żądana strona nie jest już dostępna',
},
'Length Required': {
fr: 'Longueur requise',
ru: 'Необходима длина',
uk: 'Потрібно вказати розмір',
uk: 'Потрібно вказати довжину',
pt: 'Content-Length necessário',
nl: 'Lengte benodigd',
de: 'Länge benötigt',
es: 'Longitud requerida',
zh: '需要长度',
id: 'Panjang yang diperlukan',
pl: 'Wymagana długość',
},
'The "Content-Length" is not defined. The server will not accept the request without it': {
fr: 'Le "Content-Length" nest pas défini. Le serveur ne prendra pas en compte la requête',
@ -301,6 +359,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Die "Content-Length" ist nicht definiert. Ohne sie akzeptiert der Server die Anfrage nicht',
es: 'El "Content-Legth" no eta definido. Este servidor no aceptará la petición sin él',
zh: '未指定Content-Length(内容长度)。服务器将不接受不包含此头信息的请求',
id: '"Content-Length" tidak ditentukan. Server tidak akan menerima permintaan tanpa itu',
pl: 'Wartość "Content-Length" nie jest zdefiniowana. Serwer nie zaakceptuje żądania bez tego parametru',
},
'Precondition Failed': {
fr: 'Échec de la condition préalable',
@ -311,16 +371,19 @@ Object.defineProperty(window, 'l10n', {
de: 'Vorbedingung fehlgeschlagen',
es: 'Precondición fallida',
zh: '前置条件判定失败',
pl: 'Niespełnienie warunku wstępnego',
},
'The pre condition given in the request evaluated to false by the server': {
fr: 'La précondition donnée dans la requête a été évaluée comme étant fausse par le serveur',
ru: 'Ни одно из условных полей заголовка запроса не было выполнено',
uk: 'Жодна з умовних полів заголовка запиту не була виконана',
uk: 'Жодна з передумов запиту не була виконана',
pt: 'A pré-condição dada na solicitação avaliada como falsa pelo servidor',
nl: 'De vooraf gestelde voorwaarde is afgewezen door de server',
de: 'Die in der Anfrage angegebene Vorbedingung wird vom Server als falsch bewertet',
es: 'La precondición ha sido evaluada como negativa para esta petición por el servidor',
zh: '服务器评估请求中给出的前置条件的结果为false(假)',
id: 'Prakondisi gagal',
pl: 'Warunek wstępny podany w żądaniu został oceniony przez serwer jako nieprawidłowy',
},
'Payload Too Large': {
fr: 'Charge trop volumineuse',
@ -329,8 +392,10 @@ Object.defineProperty(window, 'l10n', {
pt: 'Payload muito grande',
nl: 'Aanvraag te grood',
de: 'Anfrage zu groß',
es: 'Carga muy grande',
es: 'Carga demasiado grande',
zh: '请求体过大',
id: 'Muatan terlalu besar',
pl: 'Żądanie jest zbyt duże',
},
'The server will not accept the request, because the request entity is too large': {
fr: 'Le serveur ne prendra pas en compte la requête, car lentité de la requête est trop volumineuse',
@ -341,6 +406,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Der Server akzeptiert die Anfrage nicht, da die Datenmenge zu groß ist',
es: 'El servidor no aceptará esta petición, porque la carga es demasiado grande',
zh: '请求体过大,服务器将不接受该请求',
id: 'Server tidak akan menerima permintaan, karena entitas permintaan terlalu besar',
pl: 'Serwer nie zaakceptuje żądania, ponieważ żądanie jest zbyt duże',
},
'Requested Range Not Satisfiable': {
fr: 'Requête non satisfaisante',
@ -351,16 +418,20 @@ Object.defineProperty(window, 'l10n', {
de: 'Anfrage-Bereich nicht erfüllbar',
es: 'Intervalo solicitado no satisfactorio',
zh: '不满足请求范围',
id: 'Rentang yang diminta tidak dapat dipenuhi',
pl: 'Żądany zakres nie jest satysfakcjonujący',
},
'The requested byte range is not available and is out of bounds': {
fr: 'Le byte range demandé nest pas disponible et est hors des limites',
ru: 'Запрошенный диапазон данных недоступен или вне допустимых пределов',
uk: 'Описаний діапазон даних недоступний або з допустимих меж',
uk: 'Описаний діапазон даних недоступний або поза допустимими межами',
pt: 'O intervalo de bytes solicitado não está disponível e está fora dos limites',
nl: 'De aangevraagde bytes zijn buiten het limiet',
de: 'Der angefragte Teilbereich der Ressource existiert nicht oder ist ungültig',
es: 'El intervalo de bytes requerido no está disponible o se encuentra fuera de los límites',
zh: '请求的字节范围不可用,超出边界',
id: 'Rentang byte yang diminta tidak tersedia dan di luar batas',
pl: 'Żądany zakres bajtów nie jest dostępny i znajduje się poza zakresem',
},
'I\'m a teapot': {
fr: 'Je suis une théière',
@ -371,16 +442,20 @@ Object.defineProperty(window, 'l10n', {
de: 'Ich bin eine Teekanne',
es: 'Soy una tetera',
zh: '我是一只茶壶',
id: 'Saya adalah teko',
pl: 'Jestem czajniczkiem',
},
'Attempt to brew coffee with a teapot is not supported': {
fr: 'Tenter de préparer du café avec une théière nest pas pris en charge',
ru: 'Попытка заварить кофе в чайнике обречена на фиаско',
uk: 'Спроба виварити каву в чайник приречена на фіаско',
uk: 'Спроба заварити каву в чайнику приречена на фіаско',
pt: 'A tentativa de preparar café com um bule não é suportada',
nl: 'Koffie maken met een theepot is niet ondersteund',
de: 'Der Versuch, Kaffee mit einer Teekanne zuzubereiten, wird nicht unterstützt',
es: 'Intentar hacer un café en una tetera no está soportado',
zh: '用茶壶泡咖啡不受支持',
id: 'Upaya menyeduh kopi dengan teko tidak didukung',
pl: 'Próba zaparzenia kawy za pomocą czajniczka nie jest obsługiwana',
},
'Too Many Requests': {
fr: 'Trop de requêtes',
@ -391,16 +466,20 @@ Object.defineProperty(window, 'l10n', {
de: 'Zu viele Anfragen',
es: 'Demasiadas peticiones',
zh: '请求过多',
id: 'Terlalu banyak permintaan',
pl: 'Zbyt wiele żądań',
},
'Too many requests in a given amount of time': {
fr: 'Trop de requêtes dans un délai donné',
ru: 'Отправлено слишком много запросов за короткое время',
uk: 'Надіслано занадто багато запитів на короткий час',
uk: 'Надіслано занадто багато запитів за короткий проміжок час',
pt: 'Excesso de solicitações em um determinado período de tempo',
nl: 'Te veel verzoeken binnen een bepaalde tijd',
de: 'Der Client hat zu viele Anfragen in einem bestimmten Zeitraum gesendet',
es: 'Demasiadas peticiones en un determinado periodo de tiempo',
zh: '在给定的时间内发送了过多请求',
id: 'Terlalu banyak permintaan dalam waktu tertentu',
pl: 'Zbyt wiele żądań w określonym czasie',
},
'Internal Server Error': {
fr: 'Erreur interne du serveur',
@ -411,16 +490,20 @@ Object.defineProperty(window, 'l10n', {
de: 'Interner Server-Fehler',
es: 'Error Interno',
zh: '内部服务器错误',
id: 'Kesalahan server internal',
pl: 'Wewnętrzny błąd serwera',
},
'The server met an unexpected condition': {
fr: 'Le serveur a rencontré une condition inattendue',
ru: 'Произошло что-то неожиданное на сервере',
uk: 'На сервері було щось несподіване',
uk: 'На сервері відбулось щось неочікуване',
pt: 'O servidor encontrou uma condição inesperada',
nl: 'De server ondervond een onverwachte conditie',
de: 'Der Server hat einen internen Fehler festgestellt',
es: 'El servidor ha encontrado una condición no esperada',
zh: '服务器遇到了意外情况',
id: 'Server mengalami kondisi yang tidak terduga',
pl: 'Serwer napotkał nieoczekiwany stan',
},
'Bad Gateway': {
fr: 'Mauvaise passerelle',
@ -428,19 +511,23 @@ Object.defineProperty(window, 'l10n', {
uk: 'Помилка шлюзу',
pt: 'Gateway inválido',
nl: 'Ongeldige Gateway',
de: 'Fehlerhafter Gateway',
de: 'Fehlerhaftes Gateway',
es: 'Puerta de enlace no valida',
zh: '无效网关',
id: 'Gateway yang buruk',
pl: 'Błąd bramki',
},
'The server received an invalid response from the upstream server': {
fr: 'Le serveur a reçu une réponse invalide du serveur distant',
ru: 'Сервер получил некорректный ответ от вышестоящего сервера',
uk: 'Сервер отримав неправильну відповідь з сервера Upstream',
uk: 'Сервер отримав невірну відповідь від попереднього сервера',
pt: 'O servidor recebeu uma resposta inválida do servidor upstream',
nl: 'De server ontving een ongeldig antwoord van een bovenliggende server',
de: 'Der Server hat eine ungültige Antwort vom Upstream-Server erhalten',
es: 'El servidor ha recibido una respuesta no válida del servidor de origen',
zh: '服务器从上游服务器收到了无效的响应',
id: 'Server menerima respons yang tidak valid dari server induk',
pl: 'Serwer otrzymał nieprawidłową odpowiedź od serwera nadrzędnego',
},
'Service Unavailable': {
fr: 'Service indisponible',
@ -451,6 +538,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Dienst nicht verfügbar',
es: 'Servicio no disponible',
zh: '服务不可用',
id: 'Layanan tidak tersedia',
pl: 'Serwis niedostępny',
},
'The server is temporarily overloading or down': {
fr: 'Le serveur est temporairement en surcharge ou indisponible',
@ -461,6 +550,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Der Server ist vorübergehend überlastet oder ausgefallen',
es: 'El servidor está temporalmente sobrecargado o inactivo',
zh: '服务器暂时过载或不可用',
id: 'Server untuk sementara kelebihan beban atau tidak tersedia',
pl: 'Serwer jest tymczasowo przeciążony lub wyłączony',
},
'Gateway Timeout': {
fr: 'Expiration Passerelle',
@ -471,16 +562,20 @@ Object.defineProperty(window, 'l10n', {
de: 'Gateway Zeitüberschreitung',
es: 'Tiempo límite de puerta de enlace excedido',
zh: '网关超时',
id: 'Batas waktu gateway',
pl: 'Przekroczenie limitu czasu bramki',
},
'The gateway has timed out': {
fr: 'Le temps dattente de la passerelle est dépassé',
ru: 'Сервер не дождался ответа от вышестоящего сервера',
uk: 'Сервер не чекав відповіді від сервера Upstream',
uk: 'У шлюзу закінчився час очікування',
pt: 'O gateway esgotou o tempo limite',
nl: 'De verbinding naar de bovenliggende server is verlopen',
de: 'Das Zeitlimit für den Verbindungsaufbau mit dem Upstream-Server ist abgelaufen',
es: 'La puerta de enlace ha sobrepasado el tiempo límite',
zh: '网关响应已经超时',
id: 'Sambungan ke server induk telah kedaluwarsa',
pl: 'Bramka przekroczyła limit czasu',
},
'HTTP Version Not Supported': {
fr: 'Version HTTP non prise en charge',
@ -491,6 +586,8 @@ Object.defineProperty(window, 'l10n', {
de: 'HTTP-Version wird nicht unterstützt',
es: 'Versión de HTTP no soportada',
zh: 'HTTP版本不受支持',
id: 'Versi HTTP tidak didukung',
pl: 'Wersja HTTP nie jest obsługiwana',
},
'The server does not support the "http protocol" version': {
fr: 'Le serveur ne supporte pas la version du protocole HTTP',
@ -501,6 +598,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Der Server unterstützt die HTTP-Protokoll-Version nicht',
es: 'El servidor no soporta la versión del protocolo HTTP',
zh: '服务器不支持该HTTP协议版本',
id: 'Server tidak mendukung versi HTTP ini',
pl: 'Serwer nie obsługuje wersji "protokołu http"',
},
'Host': {
@ -512,6 +611,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Host',
es: 'Host',
zh: '主机',
id: 'Host',
pl: 'Host',
},
'Original URI': {
fr: 'URI dorigine',
@ -522,6 +623,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Originale URI',
es: 'URI original',
zh: '原始URI',
id: 'URL asli',
pl: 'Oryginalny URI',
},
'Forwarded for': {
fr: 'Transmis pour',
@ -530,8 +633,10 @@ Object.defineProperty(window, 'l10n', {
pt: 'Encaminhado para',
nl: 'Doorgestuurd voor',
de: 'Weitergeleitet für',
es: 'Remitido por',
es: 'Remitido para',
zh: '转发自',
id: 'Diteruskan untuk',
pl: 'Przekazane do',
},
'Namespace': {
fr: 'Espace de noms',
@ -542,16 +647,20 @@ Object.defineProperty(window, 'l10n', {
de: 'Namensraum',
es: 'Namespace',
zh: '命名空间',
id: 'Ruang nama',
pl: 'Przestrzeń nazw',
},
'Ingress name': {
fr: 'Nom ingress',
ru: 'Имя Ingress',
uk: 'Ім\'я Ingress',
uk: 'Ім\'я входу',
pt: 'Nome Ingress',
nl: 'Ingress naam',
de: 'Ingress Name',
es: 'Nombre Ingress',
zh: '入口名',
id: 'Nama ingress',
pl: 'Nazwa wejścia',
},
'Service name': {
fr: 'Nom du service',
@ -562,6 +671,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Service Name',
es: 'Nombre del servicio',
zh: '服务名',
id: 'Nama layanan',
pl: 'Nazwa usługi',
},
'Service port': {
fr: 'Port du service',
@ -572,6 +683,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Service Port',
es: 'Puerto del servicio',
zh: '服务端口',
id: 'Port layanan',
pl: 'Port usługi',
},
'Request ID': {
fr: 'Identifiant de la requête',
@ -582,16 +695,20 @@ Object.defineProperty(window, 'l10n', {
de: 'Anfrage ID',
es: 'ID de la petición',
zh: '请求ID',
id: 'ID permintaan',
pl: 'Identyfikator żądania',
},
'Timestamp': {
fr: 'Horodatage',
ru: 'Временная метка',
uk: 'Тимчасова мітка',
uk: 'Мітка часу',
pt: 'Timestamp',
nl: 'Tijdstempel',
de: 'Zeitstempel',
es: 'Timestamp',
zh: '时间戳',
id: 'Cap waktu',
pl: 'Sygnatura czasowa',
},
'client-side error': {
@ -603,6 +720,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Clientseitiger Fehler',
es: 'Error del lado del cliente',
zh: '客户端错误',
id: 'Kesalahan sisi klien',
pl: 'błąd po stronie klienta',
},
'server-side error': {
fr: 'Erreur Serveur',
@ -613,6 +732,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Serverseitiger Fehler',
es: 'Error del lado del servidor',
zh: '服务端错误',
id: 'Kesalahan sisi server',
pl: 'błąd po stronie serwera',
},
'Your Client': {
@ -622,28 +743,34 @@ Object.defineProperty(window, 'l10n', {
pt: 'Seu Cliente',
nl: 'Jouw Client',
de: 'Ihr Client',
es: 'Tu cliente',
es: 'Tu Cliente',
zh: '您的客户端',
id: 'Klien Anda',
pl: 'Klient',
},
'Network': {
fr: 'Réseau',
ru: 'Сеть',
uk: 'Сіть',
uk: 'Мережа',
pt: 'Rede',
nl: 'Netwerk',
de: 'Netzwerk',
es: 'Red',
zh: '网络',
id: 'Jaringan',
pl: 'Sieć',
},
'Web Server': {
fr: 'Serveur Web',
ru: 'Web Сервер',
uk: 'Web Сервер',
uk: 'Web-сервер',
pt: 'Servidor web',
nl: 'Web Server',
de: 'Webserver',
es: 'Servidor web',
es: 'Servidor Web',
zh: 'Web服务器',
id: 'Server web',
pl: 'Serwer WWW',
},
'What happened?': {
fr: 'Que sest-il passé ?',
@ -654,6 +781,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Was ist passiert?',
es: '¿Que ha pasado?',
zh: '发生了什么?',
id: 'Apa yang terjadi?',
pl: 'Co się stało?',
},
'What can i do?': {
fr: 'Que puis-je faire ?',
@ -664,6 +793,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Was kann ich machen?',
es: '¿Que puedo hacer?',
zh: '我能做什么?',
id: 'Apa yang bisa saya lakukan?',
pl: 'Co mogę zrobić?',
},
'Please try again in a few minutes': {
fr: 'Veuillez réessayer dans quelques minutes',
@ -674,6 +805,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Bitte versuchen Sie es in ein paar Minuten erneut',
es: 'Por favor, intente nuevamente en unos minutos',
zh: '请在几分钟后重试',
id: 'Silakan coba lagi dalam beberapa menit',
pl: 'Spróbuj ponownie za kilka minut',
},
'Working': {
fr: 'Opérationnel',
@ -682,8 +815,10 @@ Object.defineProperty(window, 'l10n', {
pt: 'Funcionando',
nl: 'Functioneel',
de: 'Funktioniert',
es: 'Trabajando',
es: 'Funcionando',
zh: '正常运行',
id: 'Fungsi',
pl: 'Działa',
},
'Unknown': {
fr: 'Inconnu',
@ -694,6 +829,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Unbekannt',
es: 'Desconocido',
zh: '未知',
id: 'Tidak diketahui',
pl: 'Nieznany',
},
'Please try to change the request method, headers, payload, or URL': {
fr: 'Veuillez essayer de changer la méthode de requête, les en-têtes, le contenu ou lURL',
@ -704,6 +841,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Bitte versuchen Sie, die Anfragemethode, Header, Payload oder URL zu ändern',
es: 'Por favor intente cambiar el método de la petición, cabeceras, carga o URL',
zh: '请尝试更改请求方法、标头、有效负载或URL',
id: 'Coba lagi dengan metode, header, muatan, atau URL yang berbeda',
pl: 'Spróbuj zmienić metodę żądania, nagłówki, żądanie lub adres URL',
},
'Please check your authorization data': {
fr: 'Veuillez vérifier vos données dautorisation',
@ -714,6 +853,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Bitte überprüfen Sie Ihre Zugangsdaten',
es: 'Verifique sus datos de autorización',
zh: '请检查您的授权数据',
id: 'Memeriksa detail autentikasi',
pl: 'Sprawdź swoje dane autoryzacyjne',
},
'Please double-check the URL and try again': {
fr: 'Veuillez vérifier lURL et réessayer',
@ -724,6 +865,8 @@ Object.defineProperty(window, 'l10n', {
de: 'Bitte überprüfen Sie die URL und versuchen Sie es erneut',
es: 'Verifique de nuevo la URL y vuelva a probar',
zh: '请再次检查URL并重试',
id: 'Periksa URL dan coba lagi',
pl: 'Sprawdź adres URL i spróbuj ponownie',
},
};

View File

@ -19,3 +19,5 @@ By default, pages markup contains strings in English (`en` locale). If you want
- 🇩🇪 German by [@mschoeffmann](https://github.com/mschoeffmann)
- 🇪🇸 Spanish by [@Runig006](https://github.com/Runig006)
- 🇨🇳 Chinese by [@CDN18](https://github.com/CDN18)
- 🇮🇩 Indonesian by [@getwisp](https://github.com/getwisp)
- 🇵🇱 Polish by [@wielorzeczownik](https://github.com/wielorzeczownik)

View File

@ -1,6 +1,6 @@
GET http://{{ host }}:{{ port }}/not-found
HTTP/* 404
HTTP 404
[Asserts]
header "Content-Type" contains "text/html"

View File

@ -1,6 +1,6 @@
GET http://{{ host }}:{{ port }}/502.html
HTTP/* 200
HTTP 200
[Asserts]
header "Content-Type" contains "text/html"

View File

@ -10,7 +10,7 @@ X-Request-ID: ccc
X-Forwarded-For: ddd
Host: eee
HTTP/* 200
HTTP 200
[Asserts]
header "Content-Type" contains "application/json"
@ -33,7 +33,7 @@ jsonpath "$.details.timestamp" isInteger
GET http://{{ host }}:{{ port }}/502.html
X-Format: text/json
HTTP/* 200
HTTP 200
[Asserts]
header "Content-Type" contains "application/json"

View File

@ -10,7 +10,7 @@ X-Request-ID: ccc
X-Forwarded-For: ddd
Host: eee
HTTP/* 200
HTTP 200
[Asserts]
header "Content-Type" contains "application/xml"
@ -32,7 +32,7 @@ xpath "string(//error/details/timestamp)" exists
GET http://{{ host }}:{{ port }}/502.html
X-Format: text/xml
HTTP/* 200
HTTP 200
[Asserts]
header "Content-Type" contains "application/xml"

View File

@ -1,12 +1,12 @@
GET http://{{ host }}:{{ port }}/healthz
HTTP/* 200
HTTP 200
```OK```
`OK`
# Next endpoint marked as deprecated
GET http://{{ host }}:{{ port }}/health/live
HTTP/* 200
HTTP 200
```OK```
`OK`

View File

@ -1,7 +1,7 @@
# HTML content
GET http://{{ host }}:{{ port }}/
HTTP/* 404
HTTP 404
[Asserts]
header "Content-Type" contains "text/html"
@ -12,7 +12,7 @@ body contains "Not Found"
GET http://{{ host }}:{{ port }}/
Content-Type: text/json
HTTP/* 404
HTTP 404
[Asserts]
header "Content-Type" contains "application/json"
@ -25,7 +25,7 @@ jsonpath "$.message" == "Not Found"
GET http://{{ host }}:{{ port }}/
Content-Type: application/xml
HTTP/* 404
HTTP 404
[Asserts]
header "Content-Type" contains "application/xml"

View File

@ -1,8 +1,10 @@
GET http://{{ host }}:{{ port }}/metrics
# disabled until https://github.com/Orange-OpenSource/hurl/issues/2540 is not fixed
HTTP/* 200
[Asserts]
header "Content-Type" contains "text/plain"
body contains "http_requests_duration_millisecond"
body contains "http_requests_total_count"
#GET http://{{ host }}:{{ port }}/metrics
#
#HTTP 200
#
#[Asserts]
#header "Content-Type" contains "text/plain"
#body contains "http_requests_duration_millisecond"
#body contains "http_requests_total_count"

View File

@ -4,7 +4,7 @@ bar: BAR
Baz_blah: baz Baz
NonEx: skip
HTTP/* 200
HTTP 200
[Asserts]
header "X-Foo" == "foo"

View File

@ -10,7 +10,7 @@ It can perform requests, capture values and evaluate queries on headers and body
# Get home:
GET https://example.net
HTTP/1.1 200
HTTP 200
[Captures]
csrf_token: xpath "string(//meta[@name='_csrf_token']/@content)"
@ -18,7 +18,7 @@ csrf_token: xpath "string(//meta[@name='_csrf_token']/@content)"
POST https://example.net/login?user=toto&password=1234
X-CSRF-TOKEN: {{csrf_token}}
HTTP/1.1 302
HTTP 302
```
### Links:

View File

@ -1,6 +1,6 @@
GET http://{{ host }}:{{ port }}/version
HTTP/* 200
HTTP 200
[Asserts]
header "Content-Type" == "application/json"

View File

@ -2,7 +2,7 @@
GET http://{{ host }}:{{ port }}/
X-Code: 410
HTTP/* 410
HTTP 410
[Asserts]
header "Content-Type" contains "text/html"
@ -15,7 +15,7 @@ GET http://{{ host }}:{{ port }}/
X-Code: 410
X-Format: text/html;q=0.9,application/xhtml+xml;q=0.9,application/json,image/avif,image/webp,*/*;q=0.8
HTTP/* 410
HTTP 410
[Asserts]
header "Content-Type" contains "application/json"
@ -28,7 +28,7 @@ jsonpath "$.message" == "Gone"
GET http://{{ host }}:{{ port }}/502.html
X-Code: 410
HTTP/* 200
HTTP 200
[Asserts]
header "Content-Type" contains "text/html"