1
0
mirror of https://github.com/chubin/cheat.sh.git synced 2026-06-20 13:16:44 +02:00

Add doc/developer.md

This commit is contained in:
Igor Chubin
2021-01-31 18:50:00 +01:00
parent 5bb899be9e
commit dabff40376
+18
View File
@@ -0,0 +1,18 @@
## Developer Keys
If you have a developer key, you can provide it in your queries
to get access to experimental cheat.sh features.
The developer key must be specified as the `X-Cheatsh-Key` header of the query.
To check, if you key is valid, query `/:authorized`:
```
$ curl -H "X-Cheatsh-Key: 2ecf6cba-a8b2-04a7-7a51-XXXX" http://127.0.0.1:8002/:authorized
AUTHORIZED (developer)
$ curl -H "X-Cheatsh-Key: 2ecf6cba-a8b2-04a7-7a51-YYYY" http://127.0.0.1:8002/:authorized
NOT AUTHORIZED
```
If you use editor plugins to access *cheat.sh*, see the plugin documentation
for information about key usage.