https://github.com/mkon/api_valve
Lightweight ruby/rack API reverse proxy or gateway.
https://github.com/mkon/api_valve
api-gateway hacktoberfest proxy rack ruby
Last synced: 17 days ago
JSON representation
Lightweight ruby/rack API reverse proxy or gateway.
- Host: GitHub
- URL: https://github.com/mkon/api_valve
- Owner: mkon
- License: mit
- Created: 2018-02-18T21:11:17.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2025-05-23T07:20:05.000Z (about 1 month ago)
- Last Synced: 2025-06-01T10:45:05.900Z (about 1 month ago)
- Topics: api-gateway, hacktoberfest, proxy, rack, ruby
- Language: Ruby
- Homepage:
- Size: 203 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ApiValve
[](https://badge.fury.io/rb/api_valve)

[](https://depfu.com/github/mkon/api_valve?project_id=5958)Extensible rack application that serves as lightweight API reverse proxy.
## Installation
Just add the gem to your `Gemfile`
```ruby
gem 'api_valve'
```## Usage
See the [examples](https://github.com/mkon/api_valve/tree/master/examples) section on how to
create & configure your own proxy using this gem.### Headers
By default the following headers are forwarded:
* `Accept`
* `Content-Type`
* `User-Agent`
* `X-Real-IP`
* `X-Request-Id`Additionally these headers are generated:
* `X-Forwarded-For`: The ApiGateway is added to the list
* `X-Forwarded-Host`: Filled with original request host
* `X-Forwarded-Port`: Filled with original request port
* `X-Forwarded-Prefix`: Filled with the path prefix of the forwarder within the Api Gateway (eg `SCRIPT_NAME` env)
* `X-Forwarded-Proto`: Filled with original request scheme