aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-03-08 04:39:55 +0000
committerFuwn <[email protected]>2022-03-08 04:39:55 +0000
commit4fd3e42f8c894d33d77bf9060fbcac02e4eed711 (patch)
tree250daecc2eef6c4934af6aa1a8bc2a8ba92c7029 /src/lib.rs
parentfix(routes): index version (diff)
downloadapi-worker-4fd3e42f8c894d33d77bf9060fbcac02e4eed711.tar.xz
api-worker-4fd3e42f8c894d33d77bf9060fbcac02e4eed711.zip
fix: cors
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 5f6f77d..229472a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -63,7 +63,8 @@ pub async fn main(
Response::from_json(&serde_json::json!({
"crate_version": env!("CARGO_PKG_VERSION"),
"git_commit_hash": env!("GIT_COMMIT_HASH"),
- }))
+ }))?
+ .with_cors(&utils::cors())
})
.run(request, environment)
.await