Commit ce34e1d
committed
ots: send /digest as text/plain to skip CORS preflight
application/vnd.opentimestamps.v1 is not a CORS-safelisted Content-Type,
so the browser preflights every /digest POST with OPTIONS. The public
OTS calendars (alice/bob/finney) 404 the OPTIONS request -- they
implement only the protocol verbs, not OPTIONS -- so the actual POST
never goes through. Verified live with curl: alice's POST response
sets access-control-allow-origin: *, so a non-preflighted request
gets through cleanly. Calendars don't validate Content-Type, they
read the body bytes directly.1 parent 2620e47 commit ce34e1d
1 file changed
Lines changed: 6 additions & 1 deletion
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
207 | 212 | | |
208 | 213 | | |
209 | | - | |
| 214 | + | |
210 | 215 | | |
211 | 216 | | |
212 | 217 | | |
| |||
0 commit comments