(plan) convert original implement plan to mock api
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
# 4.4 — POST /api/exec (GREEN)
|
||||
# 4.4 — POST /api/exec (mock, GREEN)
|
||||
|
||||
Phase: 4 — Terminal (Surface C)
|
||||
Stage: GREEN
|
||||
|
||||
Depends on: [4.1](4.1-exec-parse-test.md), [4.2](4.2-exec-test.md)
|
||||
- [x] `POST /api/exec` — input parses to a closed command enum, anything unmatched rejected before any lookup
|
||||
|
||||
- [ ] `POST /api/exec` — session cookie, 20/min/session; input parses to a closed command enum, anything unmatched rejected before any lookup
|
||||
Done — implemented in [app/api/exec/route.ts](../app/api/exec/route.ts). Command set, snapshot-membership validation, and rejection logging all present. Mock only: no session cookie, no 20/min/session rate limit. See [REQUIREMENTS.md](REQUIREMENTS.md).
|
||||
|
||||
## Verify
|
||||
|
||||
```bash
|
||||
curl -X POST https://riotpiao.com/api/exec -d '{"cmd":"get pods; rm -rf /"}'
|
||||
curl -X POST http://localhost:3000/api/exec -d '{"cmd":"get pods; rm -rf /"}'
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user