v0.2.0
Response caching
Added in memory response caching for requests. That allows to reduce response time for requests that are repeated often
or have long response time.
Each mapping has own cache settings that can be configured in config file.
mappings:
- from: localhost
to: https://github.com
cache:
/api/path
/other-path
By default, cached only GET requests. To enable caching for other methods use methods
option in cache-config
section:
mappings:
- from: localhost
to: https://github.com
cache: [...]
cache-config:
methods:
- GET
- POST
- PUT
Also, you can configure cache expiration time and cache clear time.
mappings:
- from: localhost
to: https://github.com
cache: [...]
cache-config:
methods: [GET, POST]
expiration-time: 10m
clear-time: 1h
Config Schema file
Added JSON Schema for configuration file
- Schema URL:
https://raw.githubusercontent.com/evg4b/uncors/develop/schema.json
- Schema version: JSON Schema version 4
- File paths patterns:
*.uncors.yml
,*.uncors.yaml
,.uncors.yml
,.uncors.yaml
Other points
- Automatically restarts the server after configuration files change.
- Config file validation before starting or reloading the server
Changelog
- 53a4dc1 Added json schema for configuration file (#19)
- 05125c2 Added helpers.CloseSafe method
- dc0b088 Added new error page
- 5b07b9f Added panics for high level structures
- ff0e8fa Added short commands
- ff31e1f Added static response printing
- 3115193 Added tests for debug panic interceptor
- 43a6bc4 Added tests for sfmt package
- 8b7606b Automatically reload the server after configuration changes (#22)
- 8580c14 Bump golang.org/x/net from 0.10.0 to 0.17.0 (#23)
- d88bdcb Changed correct errors message ordering
- cb06878 Cleanup
- b77ba94 Cleanup code
- 50f65b9 Cleanup code
- de83f47 Cleanup code
- f2c462d Cleanup code: WIP 1
- 1e8d2af Cleanup code: WIP 2
- fe447f2 Cleanup code: WIP 3
- 374daac Cleanup code: WIP 4
- b76b08d Cleanup code: WIP 4
- b6bb5c0 Cleanup deps
- ed416c0 Cleared test output
- bb9fe44 Code cleanup
- 603c18a Custom config mapping (#13)
- aa9b0ed Fix missing error notification
- f050d79 Fixed cross-domain caching issue
- 2a2d20d Fixed goreleaser pipeline
- d3a5c02 Fixed issue caching between methods
- df651fd Fixed mock waiting issue
- 91c5e10 Fixed tests
- 85847be Fixed tests after upgrading
- 201b14c Move all structures to configuration
- bc0853b Reafactoring
- 8f0de5e Refactor debug output for logger
- d4cda47 Refactored code
- f6529c6 Refactoring: Created appbuilder for tests
- d8b85ee Refactoring: hosts constants
- 273475d Rename configuration module to config
- 3c99b3c Rename infrastructure module to infra
- 62da2c6 Renamed config property raw-content to raw
- 9b4bbcf Reorganize dependencies providing (#21)
- 7fd4842 Response caching (#17)
- fe8e328 Restored validation for correct host name in replacer
- c3fcd5b Separated mock for each url mapping (#16)
- 665e6ea Squashed commit of the following:
- 4b7a562 Static file serving (#15)
- d4291b4 Update README.md
- 017904a Update README.md
- 295492e Update dependencies
- 2267b71 Update roadmap
- 781e976 Updated README.md
- a134e00 Updated README.md
- 92e9f1f Updated README.md and ROADMAP.md
- db08d33 Updated README.md and ROADMAP.md
- ef0fdbf Updated README.md and ROADMAP.md
- 462a6fd Updated Roadmap
- 49a6070 Updated dependencies
- f751aa8 Updated deps
- f31dccd Updated deps
- 2fb7759 Updated deps
- 52c4e6a Updated golangci-lint
- aeb0531 Updated linter rules
- 9b99104 Updated npm-go-bin
- 1804163 Updated packages
- c8ac00d Updated readme
- 8c15020 Updated roadmap
- a9f786a Updated workflows
- b56e4a4 Updated workspace
- 749a8fa Upgrade dependencies
- 6412d27 Upgraded deps
- c744aba Upgraded env