Skip to content

Commit

Permalink
feat: add security.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniDigger committed Jan 3, 2025
1 parent cbad072 commit 7759027
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ public void apiRootRedirect() {
this.response.setHeader("Location", "/api-docs");
}

@GetMapping(path = "/security.txt", produces = MediaType.TEXT_PLAIN_VALUE)
public String security() {
return """
Contact: mailto:[email protected]
Expires: 2027-01-01T00:00:00.000Z
Preferred-Languages: en,de
Canonical: https://hangar.papermc.io/security.txt
""";
}

@GetMapping(path = "/robots.txt", produces = MediaType.TEXT_PLAIN_VALUE)
public String robots() {
if (!this.config.isAllowIndexing()) {
Expand Down
3 changes: 3 additions & 0 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ ingress:
- path: /robots.txt
pathType: ImplementationSpecific
target: backend
- path: /security.txt
pathType: ImplementationSpecific
target: backend
- path: /(.+)/sitemap.xml
pathType: ImplementationSpecific
target: backend
Expand Down

0 comments on commit 7759027

Please sign in to comment.