Skip to content

v0.2.0

Compare
Choose a tag to compare
@github-actions github-actions released this 25 Nov 14:30
· 46 commits to main since this release

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