Skip to content

Commit 08a8631

Browse files
fix: Access-Control-Allow-Headers
Signed-off-by: Henry <mail@henrygressmann.de>
1 parent dc0552c commit 08a8631

File tree

5 files changed

+25
-16
lines changed

5 files changed

+25
-16
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/explodingcamera/liwan/test.yaml?style=flat-square)
1111
![GitHub Release](https://img.shields.io/github/v/release/explodingcamera/liwan?style=flat-square)
12-
[![Container](https://img.shields.io/badge/Container-ghcr.io%2Fexplodingcamera%2Fliwan%3Aedge-blue?style=flat-square)](https://github.com/explodingcamera/liwan/pkgs/container/liwan)
12+
[![Container](https://img.shields.io/badge/Container-ghcr.io%2Fexplodingcamera%2Fliwan%3Alatest-blue?style=flat-square)](https://github.com/explodingcamera/liwan/pkgs/container/liwan)
1313

1414
</div>
1515

src/web/mod.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,17 @@ pub fn router(app: Arc<Liwan>, events: Sender<Event>) -> Result<(axum::Router<()
5252
..openapi::OpenApi::default()
5353
};
5454

55-
let event_cors = CorsLayer::new().allow_methods([Method::POST]).allow_origin(Any).allow_credentials(false);
56-
let script_cors = CorsLayer::new().allow_methods([Method::GET]).allow_origin(Any).allow_credentials(false);
55+
let event_cors = CorsLayer::new()
56+
.allow_methods([Method::POST])
57+
.allow_origin(Any)
58+
.allow_credentials(false)
59+
.allow_headers([http::header::CONTENT_TYPE, http::header::ACCEPT]);
60+
61+
let script_cors = CorsLayer::new()
62+
.allow_methods([Method::GET])
63+
.allow_origin(Any)
64+
.allow_credentials(false)
65+
.allow_headers([http::header::CONTENT_TYPE, http::header::ACCEPT]);
5766

5867
let set_headers = tower::ServiceBuilder::new()
5968
.layer(SetResponseHeaderLayer::if_not_present(header::X_FRAME_OPTIONS, HeaderValue::from_static("DENY")))

web/bun.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"@astrojs/compiler-rs": "^0.1.4",
1313
"@astrojs/react": "^5.0.0",
14-
"@base-ui/react": "^1.2.0",
14+
"@base-ui/react": "^1.3.0",
1515
"@explodingcamera/css": "^0.0.4",
1616
"@fontsource-variable/stack-sans-headline": "^5.2.1",
1717
"@icons-pack/react-simple-icons": "^13.12.0",
@@ -52,7 +52,7 @@
5252
"@types/react-dom": "^19.2.3",
5353
"@types/topojson-client": "^3.1.5",
5454
"@types/topojson-specification": "^1.0.5",
55-
"astro": "6.0.3",
55+
"astro": "6.0.4",
5656
"babel-plugin-react-compiler": "^1.0.0",
5757
"rollup-plugin-license": "^3.7.0",
5858
"typescript": "^5.9.3"

0 commit comments

Comments
 (0)