alpha
Login
or
Join now
microcosm.blue
/
microcosm-rs
Star
0
Fork
3
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Constellation, Spacedust, Slingshot, UFOs: atproto crates and services for microcosm
Star
0
Fork
3
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
maybe this works for port 80 refusal
author
phil
date
4 months ago
(Feb 12, 2026, 5:59 PM -0500)
commit
93a44561
93a4456129d012fe4b918b911db245199bd466c4
parent
5a7a0c32
5a7a0c32a4b4d152b150fe1f645263d25bbd0338
+11
-4
1 changed file
Expand all
Collapse all
Unified
Split
slingshot
src
server.rs
+11
-4
slingshot/src/server.rs
Reviewed
···
1466
1466
"0.0.0.0:80"
1467
1467
}));
1468
1468
1469
1469
-
let https_plz = "this service must be accessed with https (port 443).";
1469
1469
+
#[poem::handler]
1470
1470
+
async fn https_plz() -> (poem::http::StatusCode, &'static str) {
1471
1471
+
(
1472
1472
+
poem::http::StatusCode::MISDIRECTED_REQUEST,
1473
1473
+
"this service must be accessed with https (port 443).",
1474
1474
+
)
1475
1475
+
}
1470
1476
1471
1477
let app = if let Some(redir) = acme_challenge_redirect {
1472
1478
use poem::web;
···
1479
1485
1480
1486
RouteScheme::new().https(app).http(
1481
1487
Route::new()
1482
1482
-
.nest("/", make_sync(move |_| https_plz))
1483
1483
-
.at("/.well-known/acme-challenge/:token", redirect),
1488
1488
+
.at("/.well-known/acme-challenge/:token", redirect)
1489
1489
+
.at("/*any", https_plz)
1490
1490
+
.at("/", https_plz),
1484
1491
)
1485
1492
} else {
1486
1493
RouteScheme::new()
1487
1494
.https(app)
1488
1488
-
.http(Route::new().nest("/", make_sync(move |_| https_plz)))
1495
1495
+
.http(Route::new().at("/*any", https_plz).at("/", https_plz))
1489
1496
};
1490
1497
1491
1498
Ok((listener, app))