diff --git a/Dockerfile b/Dockerfile index c14c76b..98475a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:1.63-alpine3.16 AS builder +FROM rust:1.61-alpine3.15 AS builder ARG DI_VER=1.2.5 @@ -18,7 +18,7 @@ COPY . ./ RUN cargo build --release -FROM alpine:3.16 +FROM alpine:3.15 COPY --from=builder /app/target/release/site /bin/site COPY --from=builder /app/dumb-init /bin/dumb-init diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 6d73af9..271e97d 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,2 @@ [toolchain] -channel = "1.63" +channel = "1.60" diff --git a/src/main.rs b/src/main.rs index cf75511..6bf5b80 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,8 +4,7 @@ use axum::{ extract::Extension, http::StatusCode, middleware, - response::Redirect, - routing::{any, get, get_service}, + routing::{get, get_service}, Router, }; use tower_http::{auth::RequireAuthorizationLayer, services::ServeDir, trace::TraceLayer}; @@ -74,20 +73,6 @@ async fn main() { ); } - // Define some redirects - let redirects = [ - ("/github", "https://github.com/ChewingBever"), - ("/gitea", "https://git.rustybever.be/Chewing_Bever"), - ("/gitlab", "https://gitlab.com/Chewing_Bever"), - ("/codeberg", "https://codeberg.org/Chewing_Bever"), - ("/matrix", "https://matrix.to/#/@jef:rustybever.be"), - ("/aur", "https://aur.archlinux.org/account/Chewing_Bever"), - ]; - - for (path, url) in redirects { - app = app.route(path, any(|| async { Redirect::permanent(url) })) - } - app = app // The fallback option is to serve the actual static files .fallback(