mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-01 04:38:46 +00:00
437c5dd749
resolves #38 adds RFC 9116 machine parsable File Format to Aid in Security Vulnerability Disclosure (cherry picked from commit8ab1f8375c
) (cherry picked from commit8f04f0e288
) (cherry picked from commit5ced68a7a0
)
24 lines
671 B
Go
24 lines
671 B
Go
// Copyright 2023 The Forgejo Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package web
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"code.gitea.io/gitea/modules/context"
|
|
)
|
|
|
|
const securityTxtContent = `Contact: https://codeberg.org/forgejo/forgejo/src/branch/forgejo/CONTRIBUTING.md
|
|
Contact: mailto:security@forgejo.org
|
|
Expires: 2025-06-25T00:00:00Z
|
|
Policy: https://codeberg.org/forgejo/forgejo/src/branch/forgejo/CONTRIBUTING.md
|
|
Preferred-Languages: en
|
|
`
|
|
|
|
// returns /.well-known/security.txt content
|
|
// RFC 9116, https://www.rfc-editor.org/rfc/rfc9116
|
|
// https://securitytxt.org/
|
|
func securityTxt(ctx *context.Context) {
|
|
ctx.PlainText(http.StatusOK, securityTxtContent)
|
|
}
|