mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
5e5f0de0e2
- Renamed host templates to nginx templates - Generate upstream templates - Better nginx error reporting when reloading - Use tparse for golang test reporting
31 lines
514 B
Go
31 lines
514 B
Go
package schema
|
|
|
|
// CreateNginxTemplate is the schema for incoming data validation
|
|
func CreateNginxTemplate() string {
|
|
return `
|
|
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"name",
|
|
"type",
|
|
"template"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"minLength": 1
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"pattern": "^proxy|redirect|dead|stream|upstream$"
|
|
},
|
|
"template": {
|
|
"type": "string",
|
|
"minLength": 20
|
|
}
|
|
}
|
|
}
|
|
`
|
|
}
|