@@ -69,6 +69,11 @@ configure SMS:
6969 ory update identity-config --project <project-id> --workspace <workspace-id> --file updated_config.yaml
7070 ```
7171
72+ ``` mdx-code-block
73+ </TabItem>
74+ </Tabs>
75+ ```
76+
7277### Body configuration
7378
7479The body of the above snippet decodes to the following Jsonnet template:
@@ -87,23 +92,44 @@ Fields available on the `ctx` object are:
8792- ` template_type ` : The template type, e.g. ` verification_code `
8893- ` template_data ` : The template data, e.g. ` { "VerificationCode": "1234", Idenity: { ... } } `
8994- ` message_type ` : The message type, e.g. ` sms `
95+ - ` request_headers ` : A map of all HTTP request headers forwarded from the user request (see below)
9096
91- Read the [ Jsonnet documentation ] ( ../../kratos/reference/jsonnet.mdx ) to learn more about the Jsonnet templating language.
97+ #### Accessing request headers
9298
93- ``` mdx-code-block
94- </TabItem>
95- </Tabs>
99+ The following request headers are available via ` ctx.request_headers ` :
100+
101+ ```
102+ Accept
103+ Accept-Encoding
104+ Accept-Language
105+ Content-Length
106+ Content-Type
107+ Origin
108+ Priority
109+ Referer
110+ Sec-Ch-Ua
111+ Sec-Ch-Ua-Mobile
112+ Sec-Ch-Ua-Platform
113+ Sec-Fetch-Dest
114+ Sec-Fetch-Mode
115+ Sec-Fetch-Site
116+ Sec-Fetch-User
117+ True-Client-Ip
118+ User-Agent
119+ X-Forwarded-Host
120+ Ory-Base-Url-Rewrite
121+ Ory-Base-Url-Rewrite-Token
122+ X-Ory-Original-Host
123+ Ory-No-Custom-Domain-Redirect
124+ Cf-Ipcountry
96125```
97126
127+ Read the [ Jsonnet documentation] ( ../../kratos/reference/jsonnet.mdx ) to learn more about the Jsonnet templating language.
128+
98129## Templates
99130
100131Only the ` recovery_code ` , ` verification_code ` , and ` login_code ` templates support an SMS variant. Use the CLI to configure it:
101132
102- ``` mdx-code-block
103- <Tabs groupId="console-or-cli">
104- <TabItem value="cli" label="Ory CLI">
105- ```
106-
1071331 . Download the Ory Identities config from your project and save it to a file:
108134
109135 ``` shell
@@ -145,8 +171,3 @@ Only the `recovery_code`, `verification_code`, and `login_code` templates suppor
145171 ` ` ` shell
146172 ory update identity-config --project <project-id> --workspace <workspace-id> --file updated_config.yaml
147173 ```
148-
149- ``` mdx-code-block
150- </TabItem>
151- </Tabs>
152- ```
0 commit comments