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
Lastly add your `cert.key` and `cert.crt` into your `certs/` folder and mount it to `/etc/nginx/ssl`.
104
-
105
80
## Setup
106
81
107
82
Before you can send messages via Secured Signal API you must first set up [Signal rAPI](https://github.com/bbernhard/signal-cli-rest-api/blob/master/doc/EXAMPLES.md)
@@ -175,14 +150,7 @@ In some cases you may not be able to access / modify the Request Body, in that c
175
150
In order to differentiate Injection Queries and _regular_ Queries
176
151
you have to add `@` in front of any KeyValue Pair assignment.
177
152
178
-
Supported types include **strings**, **ints**, **arrays** and **json dictionaries**. See [Formatting](#string-to-type).
179
-
180
-
## Best Practices
181
-
182
-
- Always use API tokens in production
183
-
- Run behind a TLS-enabled [Reverse Proxy](#reverse-proxy) (Traefik, Nginx, Caddy)
184
-
- Be cautious when overriding Blocked Endpoints
185
-
- Use per-token overrides to enforce least privilege
153
+
Supported types include **strings**, **ints**, **arrays** and **json dictionaries**. See [Formatting](https://codeshelldev.github.io/secured-signal-api/docs/usage/formatting).
186
154
187
155
## Configuration
188
156
@@ -197,7 +165,7 @@ To change the internal config file location set `CONFIG_PATH` in your **Environm
197
165
This example config shows all of the individual settings that can be applied:
Suppose you want to set a new [Placeholder](#placeholders)`NUMBER` in your Environment...
218
-
219
-
```yaml
220
-
environment:
221
-
SETTINGS__VARIABLES__NUMBER: "+123400001"
222
-
```
223
-
224
-
This would internally be converted into `settings.variables.number` matching the config formatting.
225
-
226
-
> [!IMPORTANT]
227
-
> Underscores `_` are removed during Conversion, Double Underscores `__` on the other hand convert the Variable into a nested Object (`__` replaced by `.`)
228
-
229
-
### String To Type
230
-
231
-
> [!TIP]
232
-
> This formatting applies to almost every situation where the only (allowed) Input Type is a string and other Output Types are needed.
233
-
234
-
If you are using Environment Variables as an example you won't be able to specify an Array or a Dictionary of items, in that case you can provide a specifically formatted string which will be translated into the correct type...
235
-
236
-
| type | example |
237
-
| :--------- | :---------------- |
238
-
| string | abc |
239
-
| string | +123 |
240
-
| int | 123 |
241
-
| int | -123 |
242
-
| json | {"a":"b","c":"d"} |
243
-
| array(int) | [1,2,3] |
244
-
| array(str) | [a,b,c] |
245
-
246
-
> [!NOTE]
247
-
> If you have a string that should not be turned into any other type, then you will need to escape all Type Denotations, `[]` or `{}` (also `-`) with a `\` **Backslash** (or Double Backslash).
248
-
> An **Odd** number of **Backslashes** **escape** the character in front of them and an **Even** number leave the character **as-is**.
249
-
250
183
### Templating
251
184
252
185
Secured Signal API uses Golang's [Standard Templating Library](https://pkg.go.dev/text/template).
@@ -260,35 +193,10 @@ Go's templating library is used in the following features:
260
193
This makes advanced [Message Templates](#message-templates) like this one possible:
0 commit comments