Skip to content

Commit 00d91b5

Browse files
committed
Redirect to mywaifu homepage
1 parent 115860f commit 00d91b5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main.rs

+5
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,10 @@ async fn healthz(data: web::Data<AppState>) -> HttpResponse {
274274
}
275275
}
276276

277+
async fn redirector() -> HttpResponse {
278+
HttpResponse::build(StatusCode::TEMPORARY_REDIRECT).append_header((header::LOCATION, "https://tracker.mywaifu.best")).finish()
279+
}
280+
277281
struct AppState {
278282
redis_connection: redis::aio::MultiplexedConnection,
279283
}
@@ -355,6 +359,7 @@ async fn main() -> std::io::Result<()> {
355359
})
356360
.service(healthz)
357361
.service(announce)
362+
.default_service(web::route().to(redirector))
358363
})
359364
.bind((host, port))?
360365
.max_connection_rate(8192)

0 commit comments

Comments
 (0)