Cors allow localhost

This commit is contained in:
Imbus 2023-12-18 17:25:26 +01:00
parent a020c2e52a
commit 88b92f2dab

View file

@ -37,6 +37,7 @@ async fn main() -> std::io::Result<()> {
HttpServer::new(move || { HttpServer::new(move || {
let cors = Cors::default() let cors = Cors::default()
.allowed_origin("https://shitpost.se") .allowed_origin("https://shitpost.se")
.allowed_origin("http://localhost:8080")
.allowed_methods(vec!["GET", "POST"]) .allowed_methods(vec!["GET", "POST"])
.max_age(3600); .max_age(3600);