5875e4b15b
* Add consul-api-double under api * Update config to reflect api change * Remove consul-api-double as a dependency * api -> mock-api * Fixup mocks path for staging
15 lines
597 B
Plaintext
15 lines
597 B
Plaintext
---
|
|
"*":
|
|
GET:
|
|
"*":
|
|
latency: ${ location.search.index ? env('CONSUL_LATENCY', 60000) : env('CONSUL_LATENCY', 0) }
|
|
headers:
|
|
response:
|
|
Status-Code: ${
|
|
// when legacy is enabled tokens and policies return a 500
|
|
(env('CONSUL_ACLS_LEGACY', false) && (location.pathname.get(2) === 'tokens' || location.pathname.get(2) === 'policies')) ?
|
|
500 :
|
|
env('CONSUL_ACLS_ENABLE', false) ? (headers['x-consul-token'] !== '' ? 200 : 403) : 401
|
|
}
|
|
X-Consul-Index: ${ parseInt((location.search.index || 1)) + 1}
|