|
|
@@ -49,7 +49,8 @@ async fn main() -> std::io::Result<()> {
|
|
|
} else {
|
|
|
Cors::default()
|
|
|
.allowed_origin_fn(|origin, _req| {
|
|
|
- origin.as_bytes().ends_with(b".chatrpg.com")
|
|
|
+ let bytes = origin.as_bytes();
|
|
|
+ bytes == b"http://localhost:5173" || bytes == b"https://chatrpg.leemorgan.dev"
|
|
|
})
|
|
|
.allowed_methods(vec!["GET", "POST", "PUT", "PATCH", "DELETE"])
|
|
|
.allow_any_header()
|