moclojer
GitHub
  • README
  • First Steps
    • Overview
    • Installation
    • Your First Mock Server
    • Dynamic Responses
    • Multiple Endpoints
    • Real-World Example
  • Templates
    • Template System Overview
    • Template Variables
  • Advanced Features
    • WebSocket Support
    • External Bodies
    • Webhook Integration
    • Rate Limiting
    • Multi-Domain Support
  • Framework Integration
    • Using as a Library
  • Reference Documentation
    • Configuration Specification
    • FAQ
  • Community and Contribution
    • Documentation Refactor
    • Code of Conduct
  • Release Notes
    • Latest Changes
    • v0.4.0
    • v0.3.5
    • v0.3.4
    • v0.3.3.1
    • v0.3.3
    • v0.3.2
    • v0.3.1
    • v0.3.0
    • v0.2
    • v0.1
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Advanced Features

Multi-Domain Support

moclojer supports multi-domain (host)

To add a specific domain for the endpoint just put the tag “host” for which domain the endpoint will respond to the request:

- endpoint:
    host: sub.moclojer.com
    method: GET
    path: /multihost-sub
    response:
      status: 200
      headers:
        Content-Type: application/json
      body: >
        {
          "domain": "sub.moclojer.com"
        }

Swagger:

GET sub.moclojer.com/multihost-sub

Specific domain for the endpoint (aka baseUrl).

{
  "domain": "sub.moclojer.com"
}
PreviousRate LimitingNextUsing as a Library

Last updated 1 year ago

Was this helpful?