2022-06-14 12:40:00 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
const (
|
2022-09-16 04:21:05 +00:00
|
|
|
dirCurrent = "./"
|
|
|
|
dirLocales = "internal/server/locales"
|
2023-01-26 03:17:50 +00:00
|
|
|
dirWeb = "web"
|
2022-09-16 04:21:05 +00:00
|
|
|
|
|
|
|
subPathCmd = "cmd"
|
|
|
|
subPathInternal = "internal"
|
|
|
|
|
2023-01-26 03:17:50 +00:00
|
|
|
fileCICommitLintConfig = ".commitlintrc.js"
|
|
|
|
fileWebI18NIndex = "src/i18n/index.ts"
|
|
|
|
fileWebPackage = "package.json"
|
2022-09-16 04:21:05 +00:00
|
|
|
|
2022-10-02 03:32:16 +00:00
|
|
|
fileDocsCommitMessageGuidelines = "docs/content/en/contributing/guidelines/commit-message.md"
|
2022-09-16 04:21:05 +00:00
|
|
|
|
2022-10-22 11:19:32 +00:00
|
|
|
fileCodeConfigKeys = "internal/configuration/schema/keys.go"
|
|
|
|
fileServerGenerated = "internal/server/gen.go"
|
|
|
|
fileScriptsGen = "cmd/authelia-scripts/cmd/gen.go"
|
2022-09-16 04:21:05 +00:00
|
|
|
|
2022-10-22 11:19:32 +00:00
|
|
|
dirDocs = "docs"
|
|
|
|
dirDocsContent = "content"
|
|
|
|
dirDocsData = "data"
|
|
|
|
dirDocsCLIReference = "en/reference/cli"
|
2022-09-16 04:21:05 +00:00
|
|
|
|
2022-10-22 11:19:32 +00:00
|
|
|
fileDocsDataLanguages = "languages.json"
|
|
|
|
fileDocsDataMisc = "misc.json"
|
|
|
|
fileDocsDataConfigKeys = "configkeys.json"
|
2022-09-16 04:21:05 +00:00
|
|
|
|
|
|
|
fileGitHubIssueTemplateFR = ".github/ISSUE_TEMPLATE/feature-request.yml"
|
|
|
|
fileGitHubIssueTemplateBR = ".github/ISSUE_TEMPLATE/bug-report.yml"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
dateFmtRFC2822 = "Mon, _2 Jan 2006 15:04:05 -0700"
|
|
|
|
dateFmtYAML = "2006-01-02T15:04:05-07:00"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
delimiterLineFrontMatter = "---"
|
|
|
|
|
|
|
|
localeDefault = "en"
|
|
|
|
localeNamespaceDefault = "portal"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
pkgConfigSchema = "schema"
|
|
|
|
pkgScriptsGen = "cmd"
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
cmdUseRoot = "authelia-gen"
|
|
|
|
cmdUseCompletion = "completion"
|
|
|
|
cmdUseDocs = "docs"
|
|
|
|
cmdUseDocsDate = "date"
|
|
|
|
cmdUseDocsCLI = "cli"
|
2022-10-22 11:19:32 +00:00
|
|
|
cmdUseDocsData = "data"
|
|
|
|
cmdUseDocsDataMisc = "misc"
|
2022-09-16 04:21:05 +00:00
|
|
|
cmdUseGitHub = "github"
|
|
|
|
cmdUseGitHubIssueTemplates = "issue-templates"
|
|
|
|
cmdUseGitHubIssueTemplatesFR = "feature-request"
|
|
|
|
cmdUseGitHubIssueTemplatesBR = "bug-report"
|
|
|
|
cmdUseLocales = "locales"
|
|
|
|
cmdUseCommitLint = "commit-lint"
|
|
|
|
cmdUseCode = "code"
|
|
|
|
cmdUseCodeScripts = "scripts"
|
|
|
|
cmdUseKeys = "keys"
|
2022-10-22 11:19:32 +00:00
|
|
|
cmdUseServer = "server"
|
2022-09-16 04:21:05 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
cmdFlagRoot = "dir.root"
|
2023-01-26 03:17:50 +00:00
|
|
|
cmdFlagWeb = "dir.web"
|
|
|
|
cmdFlagFileWebI18N = "file.web.i18n"
|
|
|
|
cmdFlagFileWebPackage = "file.web.package"
|
|
|
|
cmdFlagDocs = "dir.docs"
|
2022-09-16 04:21:05 +00:00
|
|
|
cmdFlagDirLocales = "dir.locales"
|
|
|
|
cmdFlagDocsCLIReference = "dir.docs.cli-reference"
|
|
|
|
cmdFlagDocsContent = "dir.docs.content"
|
2022-10-22 11:19:32 +00:00
|
|
|
cmdFlagDocsData = "dir.docs.data"
|
|
|
|
cmdFlagDocsDataMisc = "file.docs.data.misc"
|
|
|
|
cmdFlagDocsDataKeys = "file.docs.data.keys"
|
2023-01-26 03:17:50 +00:00
|
|
|
cmdFlagDocsDataLanguages = "file.docs.data.languages"
|
2022-09-16 04:21:05 +00:00
|
|
|
cmdFlagFileConfigKeys = "file.configuration-keys"
|
|
|
|
cmdFlagFileScriptsGen = "file.scripts.gen"
|
2022-10-22 11:19:32 +00:00
|
|
|
cmdFlagFileServerGenerated = "file.server.generated"
|
2022-09-16 04:21:05 +00:00
|
|
|
cmdFlagFileConfigCommitLint = "file.commit-lint-config"
|
|
|
|
cmdFlagFileDocsCommitMsgGuidelines = "file.docs-commit-msg-guidelines"
|
|
|
|
cmdFlagFeatureRequest = "file.feature-request"
|
|
|
|
cmdFlagBugReport = "file.bug-report"
|
2023-01-26 03:17:50 +00:00
|
|
|
|
|
|
|
cmdFlagExclude = "exclude"
|
|
|
|
cmdFlagVersions = "versions"
|
|
|
|
cmdFlagCwd = "cwd"
|
|
|
|
cmdFlagPackageConfigKeys = "package.configuration.keys"
|
|
|
|
cmdFlagPackageScriptsGen = "package.scripts.gen"
|
2022-06-14 12:40:00 +00:00
|
|
|
)
|
2022-10-22 11:19:32 +00:00
|
|
|
|
|
|
|
const (
|
|
|
|
codeCSPProductionDefaultSrc = "'self'"
|
|
|
|
codeCSPDevelopmentDefaultSrc = "'self' 'unsafe-eval'"
|
|
|
|
codeCSPNonce = "${NONCE}"
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
codeCSPValuesCommon = []CSPValue{
|
|
|
|
{Name: "default-src", Value: ""},
|
|
|
|
{Name: "frame-src", Value: "'none'"},
|
|
|
|
{Name: "object-src", Value: "'none'"},
|
|
|
|
{Name: "style-src", Value: "'self' 'nonce-%s'"},
|
|
|
|
{Name: "frame-ancestors", Value: "'none'"},
|
|
|
|
{Name: "base-uri", Value: "'self'"},
|
|
|
|
}
|
|
|
|
|
|
|
|
codeCSPValuesProduction = []CSPValue{}
|
|
|
|
|
|
|
|
codeCSPValuesDevelopment = []CSPValue{}
|
|
|
|
)
|