< RESTBase
Warning Warning: Major sections on this page are incomplete or missing. You may have greater success referencing RESTBase/Installation#Configuration.

This page documents the schema used by config.yaml for RESTBase.

config.yaml file is basically for Service-runner, so there are three things to do: The first one is configuring Service-runner, the second one is registering a RESTBase as a service for Service-runner and the third one is configuring the RESTBase.

services Clause

Placement
services

A list of maps for services. The services can be either RESTBase, Citoid, Mathoid or Cxserver so on. This page only treats restbase service.

This section has the same format as service-runner's services clause. See this document for details.

RESTBase Service Configurations

This section must be set as below:

services:
  - name: restbase
    module: hyperswitch
    conf:
      # ...

conf Clause

Placement
services * conf

A configurations map for RESTBase, not for Service-runner.

  • port - TODO
  • salt - TODO
  • default_page_size - TODO
  • user_agent - TODO
  • ui_name - TODO
  • ui_url - TODO
  • ui_title - TODO
  • spec - See spec clause below.

spec Clause

Placement
services * conf spec

A map with keys are filters or paths.

x-route-filters Clause

Placement
services * conf spec x-route-filters

A list of filters for the allowed routes. The below filters are automatically added:

- type: default
  name: metrics
- type: default
  name: validator

See also #General filter configurations.

x-request-filters Clause

Placement
services * conf spec x-request-filters

A list of filters for the allowed requests. You can use the below filters as convenience way:

- path: lib/security_response_header_filter.js
- path: lib/normalize_headers_filter.js

See also #General filter configurations.

x-sub-request-filters Clause

Placement
services * conf spec x-sub-request-filters

Example

x-sub-request-filters:
  - type: default
    name: http
    options:
      allow:
        - pattern: http://localhost/w/api.php
          forward_headers: true
        - pattern: http://localhost:8142
          forward_headers: true
        - pattern: /^https?:\/\//

General filter configurations

TODO:

If type is default and name is given, filters/<name>.js is loaded.

  • type TODO
  • name TODO
  • options TODO

paths Clause

Placement
services * conf spec paths

A map with keys for the end points.

Path Configuration

A map that contains x modules.

x-modules Clause

A list of modules.

Module Configurations

TODO:

A map.

Examples

/table module

TODO:

backend must be sqlite or cassandra.

num_workers Clause

Placement
num_workers

Same as Service-runner's num_workersclause, see the document for further details.

startup_concurrency Clause

Placement
startup_concurrency

Same as Service-runner's startup_concurrency clause, see the document for further details.

worker_heartbeat_timeout Clause

Placement
worker_heartbeat_timeout

Same as Service-runner's worker_heartbeat_timeout clause, see the document for further details.

logging Clause

Placement
services

Same as Service-runner's logging clause, see the document for further details.

Example

logging:
  name: restbase
  level: info # being "trace", "debug", "info", "warn"(Default), "error" or "fatal"

metrics Clause

Placement
metrics

Same as Service-runner's metrics clause, see the document for further details.

ratelimit Clause

Placement
ratelimit

Same as Service-runner's ratelimit clause, see the document for further details.

dns_cache Clause

Placement
dns_cache

Same as Service-runner's dns_cache clause, see the document for further details.

info Clause

Placement
info
TODO:

Example

info:
  name: restbase
  description: description

See also

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.