Skip to content

Commit

Permalink
Merge pull request #33 from ebadfd/feature/main/well-known
Browse files Browse the repository at this point in the history
feat: added well-known files with security.txt
  • Loading branch information
ebadfd authored Dec 22, 2024
2 parents f38abe7 + 6881487 commit ea406ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .well-known/security.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Contact: mailto:[email protected]
Expires: 2026-12-12T06:42:00.000Z
Preferred-Languages: en
Canonical: https://ebadfd.tech/.well-known/security.txt
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ pub async fn run_server() -> Result<()> {
.compress_when(DefaultPredicate::new());

let files = ServeDir::new("static");
let well_known_files = ServeDir::new(".well-known");

let middleware = tower::ServiceBuilder::new()
.layer(Extension(state.clone()))
Expand Down Expand Up @@ -108,6 +109,7 @@ pub async fn run_server() -> Result<()> {
)
.route("/rr", get(handlers::rr_handler))
.nest_service("/static", files)
.nest_service("/.well-known", well_known_files)
.fallback(handlers::not_found)
.layer(comression_layer)
.layer(middleware);
Expand Down

0 comments on commit ea406ce

Please sign in to comment.