Skip to content
/ api_valve Public

Lightweight ruby/rack API reverse proxy or gateway.

License

Notifications You must be signed in to change notification settings

mkon/api_valve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

83509da · Aug 1, 2024
Aug 7, 2023
Nov 3, 2022
Oct 5, 2022
Jan 22, 2024
Aug 7, 2023
Sep 19, 2018
Feb 18, 2018
Aug 7, 2023
Feb 18, 2018
Aug 1, 2024
Oct 5, 2022
Feb 18, 2018
May 8, 2022
Aug 1, 2024

Repository files navigation

ApiValve

Gem Version Depfu

Extensible rack application that serves as lightweight API reverse proxy.

Installation

Just add the gem to your Gemfile

gem 'api_valve'

Usage

See the 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