Cors allow localhost
This commit is contained in:
parent
a020c2e52a
commit
88b92f2dab
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue