Skip to content

Commit

Permalink
fix: servers cors (#1013)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
NathanFlurry committed Aug 8, 2024
1 parent 8b44a7c commit e46edfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions svc/api/servers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ rivet-operation = { path = "../../../lib/operation/core" }
chrono = "0.4"
http = "0.2"
hyper = { version = "0.14", features = ["server", "http1", "stream", "tcp"] }
lazy_static = "1.4"
rivet-api = { path = "../../../sdks/full/rust" }
rivet-cache = { path = "../../../lib/cache/build" }
rivet-claims = { path = "../../../lib/claims" }
Expand Down
3 changes: 2 additions & 1 deletion svc/api/servers/src/route/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use api_helper::define_router;
use api_helper::{define_router, util::CorsConfigBuilder};
use hyper::{Body, Request, Response};
use rivet_api::models;
use uuid::Uuid;
Expand All @@ -21,6 +21,7 @@ pub async fn handle(
}

define_router! {
cors: CorsConfigBuilder::hub().build(),
routes: {
"" : {
GET: servers::list_servers(
Expand Down

0 comments on commit e46edfb

Please sign in to comment.