Skip to content

Commit 6490ee3

Browse files
authored
Merge pull request #991 from herbie-fp/zane-checkstatus-add-CORS
Add CORS headers to checkstatus API
2 parents 697848d + fb5a696 commit 6490ee3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/api/demo.rkt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,14 +353,16 @@
353353
(string->bytes/utf-8
354354
(add-prefix (format "~a.~a/graph.html" job-id *herbie-commit*))))
355355
(header #"X-Job-Count" (string->bytes/utf-8 (~a (job-count))))
356-
(header #"X-Herbie-Job-ID" (string->bytes/utf-8 job-id)))
356+
(header #"X-Herbie-Job-ID" (string->bytes/utf-8 job-id))
357+
(header #"Access-Control-Allow-Origin" (string->bytes/utf-8 "*")))
357358
'())]
358359
[timeline
359360
(response 202
360361
#"Job in progress"
361362
(current-seconds)
362363
#"text/plain"
363-
(list (header #"X-Job-Count" (string->bytes/utf-8 (~a (job-count)))))
364+
(list (header #"X-Job-Count" (string->bytes/utf-8 (~a (job-count))))
365+
(header #"Access-Control-Allow-Origin" (string->bytes/utf-8 "*")))
364366
(λ (out)
365367
(display (apply string-append
366368
(for/list ([entry timeline])

0 commit comments

Comments
 (0)