Skip to content

Commit c789750

Browse files
committed
allow cloudflare worker cors
1 parent 9ddd80c commit c789750

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

backend/src/main.rs

+2
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ async fn main() -> ShuttleActixWeb<impl FnOnce(&mut ServiceConfig) + Send + Clon
5252
let config = move |cfg: &mut ServiceConfig| {
5353
let cors = Cors::default()
5454
.allowed_origin(ENDPOINT.base)
55+
.allowed_origin("https://wyatt.wtf") // required by cloudflare worker
56+
.allowed_origin("https://www.wyatt.wtf")
5557
.allowed_methods(vec!["GET", "POST"])
5658
.allowed_headers(vec![http::header::CONTENT_TYPE])
5759
.max_age(3600);

0 commit comments

Comments
 (0)