CORS bug fix #28
@@ -5,6 +5,10 @@ on:
|
||||
branches:
|
||||
- main
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check:
|
||||
name: Check
|
||||
|
||||
Generated
+1
-4
@@ -3129,22 +3129,19 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "textsender_api"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"axum-extra",
|
||||
"futures",
|
||||
"josekit",
|
||||
"jsonwebtoken",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sqlx 0.9.0",
|
||||
"swoosh",
|
||||
"tempfile",
|
||||
"textsender_models",
|
||||
"time",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"tower",
|
||||
"tower-http",
|
||||
"tracing-subscriber",
|
||||
|
||||
+3
-6
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "textsender_api"
|
||||
version = "0.2.0"
|
||||
version = "0.2.1"
|
||||
edition = "2024"
|
||||
rust-version = "1.96"
|
||||
|
||||
@@ -10,21 +10,18 @@ axum-extra = { version = "0.12.6", features = ["cookie"] }
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
serde_json = { version = "1.0.150" }
|
||||
tokio = { version = "1.52.3", features = ["full"] }
|
||||
tokio-util = { version = "0.7.18", features = ["io"] }
|
||||
tower = { version = "0.5.3", features = ["full"] }
|
||||
tower-http = { version = "0.6.11", features = ["cors", "timeout"] }
|
||||
tracing-subscriber = "0.3.23"
|
||||
futures = { version = "0.3.32" }
|
||||
uuid = { version = "1.23.3", features = ["v4", "serde"] }
|
||||
sqlx = { version = "0.9.0", features = ["runtime-tokio", "tls-native-tls", "postgres", "time", "uuid"] }
|
||||
time = { version = "0.3.49", features = ["formatting", "macros", "parsing", "serde"] }
|
||||
jsonwebtoken = { version = "10.4.0", features = ["rust_crypto"] }
|
||||
josekit = { version = "0.10.3" }
|
||||
utoipa = { version = "5.5.0", features = ["axum_extras"] }
|
||||
utoipa-swagger-ui = { version = "9.0.2", features = ["axum"] }
|
||||
textsender_models = { git = "ssh://git@git.kundeng.us/phoenix/textsender_models.git", tag = "v0.4.10" }
|
||||
swoosh = { git = "ssh://git@git.kundeng.us/phoenix/swoosh.git", tag = "v0.4.2.0" }
|
||||
|
||||
[dev-dependencies]
|
||||
tower = { version = "0.5.3", features = ["full"] }
|
||||
josekit = { version = "0.10.3" }
|
||||
url = { version = "2.5.8" }
|
||||
tempfile = { version = "3.27.0" }
|
||||
|
||||
@@ -33,6 +33,7 @@ pub mod init {
|
||||
let cors = tower_http::cors::CorsLayer::new()
|
||||
.allow_methods([
|
||||
axum::http::Method::GET,
|
||||
axum::http::Method::PATCH,
|
||||
axum::http::Method::POST,
|
||||
axum::http::Method::PUT,
|
||||
axum::http::Method::DELETE,
|
||||
|
||||
+1
-1
@@ -204,7 +204,7 @@ pub async fn test_token() -> Result<String, josekit::JoseError> {
|
||||
};
|
||||
|
||||
match textsender_models::token::create_token(&key, &token_resource, time::Duration::hours(1)) {
|
||||
Ok((access_token, _some_time)) => Ok(access_token),
|
||||
Ok(access_token) => Ok(access_token.access_token),
|
||||
Err(err) => Err(err),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user