-
Notifications
You must be signed in to change notification settings - Fork 79
/
config.backend.test.yaml
90 lines (83 loc) · 2.69 KB
/
config.backend.test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# RESTBase wikimedia example config
default_project: &default_project
x-modules:
- spec:
paths:
/{api:v1}:
x-modules:
- spec:
paths:
/key_value:
x-modules:
- path: sys/key_value.js
/page_revisions:
# We need to forward cookie to the API
x-route-filters:
- path: ./lib/mediawiki_auth_filter.js
x-modules:
- path: sys/page_revisions.js
/{api:sys}:
x-modules:
- spec:
paths:
/table:
x-modules:
- path: sys/table.js
options:
conf:
backend: '{env(RB_TEST_BACKEND, sqlite)}'
hosts: [localhost]
keyspace: system
username: cassandra
password: cassandra
defaultConsistency: one # or 'localQuorum' for production
storage_groups:
- name: test.group.local
domains: /./
# ignored in cassandra, but useful in SQLite testing
dbname: '{env(RB_SQLITE_FILE, test.db.sqlite3)}'
/action:
x-modules:
- path: sys/action.js
options:
apiUriTemplate: "{{'https://{domain}/w/api.php'}}"
baseUriTemplate: "{{'https://{domain}/api/rest_v1'}}"
# The root of the spec tree. Domains tend to share specs by referencing them
# using YAML references.
spec_root: &spec_root
title: "The RESTBase Storage Service"
x-sub-request-filters:
- type: default
name: http
options:
allow:
- pattern: /^https?:\/\/[a-zA-Z0-9\.]+\/w\/api\.php/
forward_headers: true
paths:
/{domain}: *default_project
# Finally, a standard service-runner config.
info:
name: restbase
services:
- name: restbase
module: hyperswitch
conf:
port: 7233
spec: *spec_root
salt: secret
default_page_size: 125
user_agent: RESTBase
ui_name: RESTBase
ui_url: https://www.mediawiki.org/wiki/RESTBase
ui_title: RESTBase docs
logging:
name: restbase
level: warn
streams:
- type: stdout
#metrics:
# type: statsd
# host: localhost
# port: 8125
# batch: true
num_workers: 0