Compare commits

..
4 Commits
Author SHA1 Message Date
LucasDLTG eaf197f86e feat: secure genrate key endpoint
CI / Rust CI (push) Successful in 2m9s
Publish & Deploy / Build and Push to Registry (push) Successful in 28s
Publish & Deploy / Deploy via SSH (push) Successful in 18s
2026-05-07 20:59:01 +02:00
LucasDLTG 7b98fab2c8 fix: add cors option http
CI / Rust CI (push) Successful in 2m8s
Publish & Deploy / Build and Push to Registry (push) Successful in 28s
Publish & Deploy / Deploy via SSH (push) Successful in 17s
2026-05-07 20:12:24 +02:00
LucasDLTG d7ab571bbe fix: release ci with sqlx
CI / Rust CI (push) Successful in 2m8s
Publish & Deploy / Build and Push to Registry (push) Successful in 27s
Publish & Deploy / Deploy via SSH (push) Successful in 7s
2026-05-07 19:56:17 +02:00
LucasDLTG 87fcd522c4 fix: release ci with sqlx
CI / Rust CI (push) Successful in 2m9s
Publish & Deploy / Build and Push to Registry (push) Failing after 14s
Publish & Deploy / Deploy via SSH (push) Has been skipped
2026-05-07 19:50:37 +02:00
4 changed files with 11 additions and 2 deletions
+2
View File
@@ -34,6 +34,8 @@ jobs:
- name: Build and Push
uses: https://github.com/docker/build-push-action@v5
env:
SQLX_OFFLINE: true
with:
context: .
push: true
+1
View File
@@ -17,6 +17,7 @@ RUN rm -rf src
# Build actual app
COPY src ./src
COPY .sqlx ./.sqlx
RUN cargo build --release
# ── Runtime Stage ─────────────────────────────────────────────────────────────
+7 -1
View File
@@ -55,7 +55,13 @@ async fn main() {
let cors = CorsLayer::new()
.allow_origin(cors_origin.parse::<HeaderValue>().unwrap())
.allow_methods([Method::GET, Method::POST, Method::PUT, Method::DELETE])
.allow_methods([
Method::GET,
Method::POST,
Method::PUT,
Method::DELETE,
Method::OPTIONS,
])
.allow_headers([
header::CONTENT_TYPE,
header::AUTHORIZATION,
+1 -1
View File
@@ -27,7 +27,7 @@ pub fn protected_router() -> Router<AppState> {
.route(
"/keys/generate",
post(apikey::create_api_key).route_layer(middleware::from_fn(|req, next| {
require_roles(req, next, None, None)
require_roles(req, next, None, Some("admin"))
})),
)
}