Skip to main content
Glama
validate_lunar_generated_header.feature2.04 kB
@legacy Feature: Validate Lunar Proxy add the x-lunar-generated on modified responses Background: Starts the Proxy Given API Provider is up And Lunar Proxy is up Scenario Outline: Lunar returns a fixed early response when policy is matched and x-lunar-generated header is true When policies.yaml file is updated And policies.yaml includes a fixed_response remedy for GET mox:8888 /uuid/* requests with status code <status> And policies.yaml includes a fixed_response remedy for GET mox:8888 /uuid/{someID} requests with status code <status> And policies.yaml includes a fixed_response remedy for GET mox:8888 /test/* requests with status code <status> And policies.yaml file is saved And apply_policies command is run without waiting for Fluent to reload When A request to <scheme>:// <host> :<port> <path> is made through Lunar Proxy with header 'Early-Response: true' Then Response has x-lunar-generated header with value true Examples: | scheme | host | port | path | status | | http | mox | 8888 | /uuid | 418 | | http | mox | 8888 | /uuid/1234 | 202 | | http | mox | 8888 | /test/prefix/path | 504 | Scenario: Requests which dont exceed the limit per endpoint defined by the remedy and headers does not have x-lunar-generated header key When policies.yaml file is updated And policies.yaml includes a strategy_based_throttling remedy for GET httpbinmock /anything/* requests with 10 requests per 1 seconds And policies.yaml file is saved And apply_policies command is run without waiting for Fluent to reload And 2 requests are sent to httpbinmock /anything/foo through Lunar Proxy And 1 requests are sent to httpbinmock /anything/bar through Lunar Proxy Then Responses does not have x-lunar-generated header

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TheLunarCompany/lunar'

If you have feedback or need assistance with the MCP directory API, please join our Discord server