You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration/structure.md
+20-14Lines changed: 20 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -81,23 +81,26 @@ This feature is powered by [go-chi/cors](https://github.com/go-chi/cors). You ca
81
81
Override headers will remove the default value containing the `Content-Type` header. Why ? Because it was though that it was better to know why it is override and not have magical values coming from nowhere.
| helpers |[String]| No |`[templates/_helpers.tpl]`| Template Golang helpers |
87
+
| targetList |[TemplateConfigurationItem](#templateconfigurationitem)| No |`targetList: { path: "templates/target-list.tpl", headers: { "Content-Type": "{{ template \"main.headers.contentType\" . }}" }, status: "200" }`| Target list template configuration. More information [here](../feature-guide/templates.md). |
88
+
| folderList |[TemplateConfigurationItem](#templateconfigurationitem)| No |`folderList: { path: "templates/folder-list.tpl", headers: { "Content-Type": "{{ template \"main.headers.contentType\" . }}" }, status: "200" }`| Folder list template configuration. More information [here](../feature-guide/templates.md). |
89
+
| notFoundError |[TemplateConfigurationItem](#templateconfigurationitem)| No |`notFoundError: { path: "templates/not-found-error.tpl", headers: { "Content-Type": "{{ template \"main.headers.contentType\" . }}" }, status: "404" }`| Not found template configuration. More information [here](../feature-guide/templates.md). |
90
+
| unauthorizedError |[TemplateConfigurationItem](#templateconfigurationitem)| No |`unauthorizedError: { path: "templates/unauthorized-error.tpl", headers: { "Content-Type": "{{ template \"main.headers.contentType\" . }}" }, status: "401" }`| Unauthorized template configuration. More information [here](../feature-guide/templates.md). |
91
+
| forbiddenError |[TemplateConfigurationItem](#templateconfigurationitem)| No |`forbiddenError: { path: "templates/forbidden-error.tpl", headers: { "Content-Type": "{{ template \"main.headers.contentType\" . }}" }, status: "403" }`| Forbidden template configuration. More information [here](../feature-guide/templates.md). |
92
+
| badRequestError |[TemplateConfigurationItem](#templateconfigurationitem)| No |`badRequestError: { path: "templates/bad-request-error.tpl", headers: { "Content-Type": "{{ template \"main.headers.contentType\" . }}" }, status: "400" }`| Bad Request template configuration. More information [here](../feature-guide/templates.md). |
93
+
| internalServerError |[TemplateConfigurationItem](#templateconfigurationitem)| No |`internalServerError: { path: "templates/internal-server-error.tpl", headers: { "Content-Type": "{{ template \"main.headers.contentType\" . }}" }, status: "500" }`| Internal server error template configuration. More information [here](../feature-guide/templates.md). |
94
+
| put |[TemplateConfigurationItem](#templateconfigurationitem)| No |`put: { path: "templates/put.tpl", headers: {}, status: "204" }`| PUT response template configuration. More information [here](../feature-guide/templates.md). |
95
+
| delete |[TemplateConfigurationItem](#templateconfigurationitem)| No |`delete: { path: "templates/put.tpl", headers: {}, status: "204" }`| DELETE response template configuration. More information [here](../feature-guide/templates.md). |
| headers | Map[String]String | False | None | Headers containing templates. Key corresponds to header and value to the template. If templated value is empty, the header won't be added to answer. More information [here](../feature-guide/templates.md#generic-case). |
103
+
| status | String | False |`""`| Status code template. It will be parsed to get an integer. |
101
104
102
105
## TargetConfiguration
103
106
@@ -125,11 +128,13 @@ See more information [here](../feature-guide/key-rewrite.md).
| helpers |[[TargetHelperConfigItem](#targethelperconfigitem)]| No | None | Helpers list custom template declarations. |
127
130
| folderList |[TargetTemplateConfigItem](#targettemplateconfigitem)| No | None | Folder list custom template declaration. More information [here](../feature-guide/templates.md). |
128
-
|notFound |[TargetTemplateConfigItem](#targettemplateconfigitem)| No | None | Not Found custom template declaration. More information [here](../feature-guide/templates.md). |
131
+
|notFoundError|[TargetTemplateConfigItem](#targettemplateconfigitem)| No | None | Not Found custom template declaration. More information [here](../feature-guide/templates.md). |
129
132
| internalServerError |[TargetTemplateConfigItem](#targettemplateconfigitem)| No | None | Internal server error custom template declaration. More information [here](../feature-guide/templates.md). |
130
-
| forbidden |[TargetTemplateConfigItem](#targettemplateconfigitem)| No | None | Forbidden custom template declaration. More information [here](../feature-guide/templates.md). |
131
-
| unauthorized |[TargetTemplateConfigItem](#targettemplateconfigitem)| No | None | Unauthorized custom template declaration. More information [here](../feature-guide/templates.md). |
132
-
| badRequest |[TargetTemplateConfigItem](#targettemplateconfigitem)| No | None | Bad Request custom template declaration. More information [here](../feature-guide/templates.md). |
133
+
| forbiddenError |[TargetTemplateConfigItem](#targettemplateconfigitem)| No | None | Forbidden custom template declaration. More information [here](../feature-guide/templates.md). |
134
+
| unauthorizedError |[TargetTemplateConfigItem](#targettemplateconfigitem)| No | None | Unauthorized custom template declaration. More information [here](../feature-guide/templates.md). |
135
+
| badRequestError |[TargetTemplateConfigItem](#targettemplateconfigitem)| No | None | Bad Request custom template declaration. More information [here](../feature-guide/templates.md). |
136
+
| put |[TargetTemplateConfigItem](#targettemplateconfigitem)| No | None | PUT custom template declaration. More information [here](../feature-guide/templates.md). |
137
+
| delete |[TargetTemplateConfigItem](#targettemplateconfigitem)| No | None | DELETE custom template declaration. More information [here](../feature-guide/templates.md). |
133
138
134
139
## TargetHelperConfigItem
135
140
@@ -145,6 +150,7 @@ See more information [here](../feature-guide/key-rewrite.md).
145
150
| inBucket | Boolean | No |`false`| Is the file in bucket or on local file system ? |
| headers | Map[String]String | False | This will be set to corresponding [TemplateConfiguration](#templateconfiguration) if empty. | Headers containing templates. Key corresponds to header and value to the template. If templated value is empty, the header won't be added to answer. More information [here](../feature-guide/templates.md#generic-case). |
153
+
| status | String | Yes | None | Status code template. It will be parsed to get an integer. |
0 commit comments