diff options
| author | Jan Tuomi <jans.tuomi@gmail.com> | 2022-02-07 16:38:17 +0200 |
|---|---|---|
| committer | Jan Tuomi <jans.tuomi@gmail.com> | 2022-02-07 16:38:17 +0200 |
| commit | c7d1061fd7fec2c21504c5d937766f72eb385130 (patch) | |
| tree | d5833b8c40c5a3e6ccc5532a74c41c7c4405215e /src/index.ts | |
| parent | d8773f844a6698bb11d947847733d7b314f3abfd (diff) | |
Fix cors, dockerize
Diffstat (limited to 'src/index.ts')
| -rw-r--r-- | src/index.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/index.ts b/src/index.ts index 8e90fbe..a5128b3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,6 +6,7 @@ import { exec as cb_exec } from "child_process" import tmp from "tmp" import fs from "fs" import { RunnerApiSubmitRequest, RunnerApiSubmitResponse } from "slam-types" +import { cors } from "@tinyhttp/cors" const exec = promisify(cb_exec) const app = new App() @@ -28,6 +29,7 @@ app .use(logger({ timestamp: { format: "YYYY-MM-DDTHH:mm:ssZ" }, })) + .use(cors()) .use(json()) .post(RunnerApiSubmitRequest.path, async (req, res) => { const body: RunnerApiSubmitRequest.Body | undefined = req.body |
