Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

469 part deux #471

Merged
merged 4 commits into from
Jan 4, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(tutorial): make the axum tutorial use javascript by default
  • Loading branch information
yaleman committed Jan 3, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 4b7f8878b2e682c697b54a6588d1e852a6595724
10 changes: 7 additions & 3 deletions tutorial/server/axum/Cargo.toml
Original file line number Diff line number Diff line change
@@ -2,7 +2,9 @@
name = "axum_tutorial"
version = "0.1.0"
edition = "2021"
authors = ["William Brown <william@blackhats.net.au>, Ben Wishovich <ben@benw.is>"]
authors = [
"William Brown <william@blackhats.net.au>, Ben Wishovich <ben@benw.is>",
]
license = "MPL-2.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -11,7 +13,9 @@ license = "MPL-2.0"
tracing.workspace = true
tracing-subscriber.workspace = true
serde.workspace = true
webauthn-rs = { workspace = true, features = ["danger-allow-state-serialisation"] }
webauthn-rs = { workspace = true, features = [
"danger-allow-state-serialisation",
] }
axum = { version = "0.7" }
tokio = { workspace = true, features = ["full"] }
uuid = { workspace = true, features = ["v4"] }
@@ -22,6 +26,6 @@ tower-http = { version = "0.6", features = ["fs"] }
tower-sessions = "0.13"

[features]
default = ["wasm"]
default = ["javascript"]
wasm = []
javascript = []
4 changes: 3 additions & 1 deletion tutorial/server/axum/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use axum::{extract::Extension, http::StatusCode, response::IntoResponse, routing::post, Router};
use std::{net::SocketAddr, path::PathBuf};
use std::net::SocketAddr;
#[cfg(feature = "wasm")]
use std::path::PathBuf;
use tower_sessions::{
cookie::{time::Duration, SameSite},
Expiry, MemoryStore, SessionManagerLayer,
Loading