Interceptor Environment Variables
VARIABLE | Description | Required? | Default Value | Example |
---|---|---|---|---|
LUNAR_PROXY_HOST | Configure Lunar.dev API Consumption Gateway IP and Port | Yes | -- | lunar-proxy:8000 |
LUNAR_HANDSHAKE_PORT | Configure Lunar.dev API Consumption Gateway Handshake Port. This port is represented as ENGINE_ADMIN_PORT on the Proxy configurations | No | 8081 | 9292 |
LUNAR_INTERCEPTOR_LOG_LEVEL | Configure the log level of the Interceptor | No | INFO | DEBUG |
LUNAR_ALLOW_LIST | When this variable is set, only requests to domains that are in LUNAR_ALLOW_LIST are forwarded to Lunar.dev API Consumption Gateway (any other request is sent directly to the API provider) | No | -- | use.com,192.168.1.1 |
LUNAR_BLOCK_LIST | When this variable is set, requests to domains that are in LUNAR_BLOCK_LIST are not forwarded to Lunar.dev API Consumption Gateway (instead they are sent directly to the API provider) | No | -- | do_not_use.com,192.168.1.2 |
LUNAR_ENTER_COOLDOWN_AFTER_ATTEMPTS | Configure the number of successive failed connection attempts that trigger a Failsafe mechanism | No | 5 | 10 |
LUNAR_EXIT_COOLDOWN_AFTER_SEC | Configure the cooldown time in seconds for turning back Proxy availability | No | 10 | 20 |
Connection Validation
When Lunar Interceptor starts, it attempts to connect to the Lunar.dev API Consumption Gateway. Normally, no message is shown for a successful connection. However, if the connection fails, an error message is printed to stdout
to indicate the issue. In debug mode, extra logs may provide more details to help diagnose connection problems.
- If both
LUNAR_BLOCK_LIST
andLUNAR_ALLOW_LIST
are empty, the Interceptor will forward all domains to the Lunar.dev API Consumption Gateway. - If
LUNAR_ALLOW_LIST
is empty, all domains except those in theLUNAR_BLOCK_LIST
will be forwarded to the gateway.