forked from wikimedia/restbase
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig.example.yaml
78 lines (75 loc) · 2.45 KB
/
config.example.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
# RESTBase config for small wiki installs
#
# - sqlite backend
# - parsoid at http://localhost:8142
# - wiki at http://localhost/w/api.php
#
# Quick setup:
# - npm install
# If you see errors about sqlite, you might have to `apt-get install
# libsqlite3-dev`.
# - cp config.example.yaml config.yaml
# - double-check and possibly modify lines marked with XXX, then start restbase with
#
# node server
#
# - If all went well, http://localhost:7231/localhost/v1/page/html/Main_Page
# should show your wiki's [[Main Page]].
services:
- name: restbase
module: hyperswitch
conf:
port: 7231
salt: secret
default_page_size: 125
user_agent: RESTBase
ui_name: RESTBase
ui_url: https://www.mediawiki.org/wiki/RESTBase
ui_title: RESTBase docs
spec:
x-request-filters:
- path: lib/security_response_header_filter.js
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?:\/\//
paths:
/{domain:localhost}:
x-modules:
- path: projects/example.yaml
options:
action:
# XXX Check API URL!
apiUriTemplate: http://localhost/w/api.php
# XXX Check the base RESTBase URI
baseUriTemplate: "{{'http://{domain}:7231/{domain}/v1'}}"
parsoid:
# XXX Check Parsoid URL!
host: http://localhost:8142
table:
backend: sqlite
dbname: db.sqlite3
pool_idle_timeout: 20000
retry_delay: 250
retry_limit: 10
show_sql: false
citoid:
host: http://citoid-beta.wmflabs.org
mathoid:
host: http://mathoid-tester.wmflabs.org
mobileapps:
host: http://appservice.wmflabs.org
purged_cache_control: s-maxage=0, max-age=86400
purged_cache_control_client_cache: s-maxage=0, max-age=300
# Finally, a standard service-runner config.
info:
name: restbase
logging:
name: restbase
level: info