Skip to content

Add .well-known/security.txt file #9048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions public/.well-known/security.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Contact: https://crates.io/policies/security
Expires: 2025-06-25T00:00:00.000Z
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're 100% going to forget this, aren't we?

I wonder if we should have a scheduled GitHub action that monitors this and tells us if it's close. (I can write that after this gets merged.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, that's a good point. I guess alternatively the file is small enough that we could also generate it on startup and serve it from the axum server 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well the point is that a person should look at it every once in a while.........

3 changes: 2 additions & 1 deletion src/middleware/common_headers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ pub async fn add_common_headers(

let path = request.uri().path();

const STATIC_FILES: [&str; 4] = [
const STATIC_FILES: [&str; 5] = [
"/github-redirect.html",
"/favicon.ico",
"/robots.txt",
"/opensearch.xml",
"/.well-known/security.txt",
];
if STATIC_FILES.contains(&path) {
expires(&mut headers, ONE_DAY);
Expand Down
Loading