-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsample-config.php
42 lines (37 loc) · 1.27 KB
/
sample-config.php
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
<?php
// The master API key from /admin/api/keys in Discourse.
$discourse_api_key = '123def789';
// The base URL of your Discourse instance. Valid API requests will be
// forwarded here, authenticated with the master API key.
$discourse_url = 'https://forums.yoursite.com/';
// Whether to include debug information in the web server's error log. WARNING:
// this will contain sensitive information such as API keys and request
// parameters!
$discourse_proxy_debug = false;
// An array of permitted client configurations. Array keys are what the client
// sends to authenticate (keep these secret), and array values describe the IP
// addresses that are permitted to use each key and the Discourse API endpoints
// that they can call.
//
// `endpoint_whitelist` entries should match values like `REQUEST_METHOD /url`.
// `ip_whitelist` entries should match values like `1.2.3.4`.
//
// Both kinds of whitelist entries may use * as a wildcard character.
$client_keys = [
'client_secret_key_1' => [
'endpoint_whitelist' => [
'GET /categories.json',
],
'ip_whitelist' => [
'127.0.0.1',
],
],
'client_secret_key_2' => [
'endpoint_whitelist' => [
'*', // You probably don't want to do this!
],
'ip_whitelist' => [
'*', // You probably don't want to do this!
],
],
];