-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathapi.yaml
More file actions
80 lines (73 loc) · 1.89 KB
/
Copy pathapi.yaml
File metadata and controls
80 lines (73 loc) · 1.89 KB
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
enabled: true
route: /api
version_prefix: v1
auth:
api_keys_enabled: true
jwt_enabled: true
# The JWT signing secret is auto-generated and stored, outside this config
# tree, in user/config/plugins/api-private.php (a non-committed PHP file,
# mirroring Grav core's security-private.php). It is intentionally not set here.
jwt_algorithm: HS256
jwt_expiry: 3600
jwt_refresh_expiry: 604800
session_enabled: true
cors:
enabled: true
# Cross-origin browser access is OFF by default (same-origin only). To allow a
# browser app on another origin, list its exact scheme+host here, e.g.
# 'https://app.example.com'. '*' is intentionally NOT the default: the API
# serves authenticated data, and a wildcard lets any website read responses
# for any token it can supply. A configured '*' is honored only for
# unauthenticated endpoints.
origins: []
methods:
- GET
- POST
- PATCH
- DELETE
- OPTIONS
headers:
- Content-Type
- Authorization
- X-API-Key
- X-API-Token
- X-Grav-Environment
- If-Match
- If-None-Match
expose_headers:
- ETag
- X-Invalidates
- X-RateLimit-Limit
- X-RateLimit-Remaining
- X-RateLimit-Reset
max_age: 86400
credentials: false
rate_limit:
enabled: true
requests: 120
window: 60
storage: file
flex_backend:
pages: true
accounts: true
pagination:
default_per_page: 20
max_per_page: 1000
invitations:
# Default lifetime of a user invite link, in seconds (default 7 days).
expiration: 604800
popularity:
enabled: true
# Skip page views from logged-in admins so your own testing/demo visits
# don't skew the stats.
exclude_admin: true
# Visitor IPs or CIDR ranges to exclude from tracking, e.g.
# '203.0.113.7' or '203.0.113.0/24' (IPv4 and IPv6 both supported).
exclude_ips: []
history:
daily: 30
monthly: 12
visitors: 20
ignore:
- '/test*'
- '/modular'