https://github.com/druids/ring-version-header
A Ring's middleware that adds a version into HTTP X-Version header
https://github.com/druids/ring-version-header
Last synced: over 1 year ago
JSON representation
A Ring's middleware that adds a version into HTTP X-Version header
- Host: GitHub
- URL: https://github.com/druids/ring-version-header
- Owner: druids
- License: mit
- Created: 2018-03-29T08:54:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-29T12:48:03.000Z (over 8 years ago)
- Last Synced: 2025-01-30T02:14:11.982Z (over 1 year ago)
- Language: Clojure
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
ring-version-header
===================
A Ring's middleware that adds a version into HTTP X-Version header.
[](https://circleci.com/gh/druids/ring-version-header)
[](https://jarkeeper.com/druids/ring-version-header)
[](https://opensource.org/licenses/MIT)
Leiningen/Boot
--------------
```clojure
[ring-version-header "0.1.0"]
```
Documentation
-------------
Wrap your handlers into `wrap-version-header`.
```clojure
(require '[ring-version-header.core :refer [wrap-version-header]]
(defn handler [request]
{:response {:foo "bar"}, :headers {}})
(def app
(wrap-version-header handler "1.0.0"))
```
And `X-Version` will be added into response headers
```clojure
{:response {:foo "bar"}, :headers {"X-Version" "1.0.0"}}
```
Contribution
------------
### Conventions
* Please follow coding style defined by [`.editorconfig`](http://editorconfig.org)
and [The Clojure Style Guide](https://github.com/bbatsov/clojure-style-guide)
* Write [good commit messages](https://chris.beams.io/posts/git-commit/)
and provide an issue ID in a commit message prefixed by `#`