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/index.md
+12-10
Original file line number
Diff line number
Diff line change
@@ -8,19 +8,20 @@
8
8
You can configure the addon by visiting CP > Addons > Dynamic Token:
9
9
10
10
***Refresh interval** - an interval for updating your csrf token every `n` minutes.
11
-
***CSS Selector** - If you want to change the default selector, **note** this will break `{{ form:create }}`.
11
+
***CSS Selector** - If you want to change the default selector, **note** this will break `{{ "{{ form:create " }}}}`.
12
12
13
13
## Usage
14
14
15
15
* disable CSRF verification by adding `/!/DynamicToken` to the `csrf_exclude` array in `site/settings/system.yaml`. Don't worry we check that the referrer is comming from your `APP_URL`, but this still carries its own risks.
16
-
* add a `\{\{ dynamic_token }}` to your layout file just before `</body>` tag.
16
+
* add a `{{ "{{ dynamic_token " }}}}` to your layout file just before `</body>` tag.
17
17
* add an `APP_URL=<your_site_url>` to your `.env` file.
18
18
e.g.:`APP_URL=site.com`
19
19
local development: `APP_URL=localhost`
20
20
21
21
## Examples
22
22
23
23
```
24
+
{% raw %}
24
25
<!DOCTYPE html>
25
26
<html lang="en">
26
27
<head>
@@ -31,18 +32,19 @@ local development: `APP_URL=localhost`
31
32
</head>
32
33
<body>
33
34
34
-
\{\{ form:create in="superfans" }}
35
-
\{\{ fields }}
36
-
<label>\{\{ display }}
37
-
<input type="text" name="\{\{ field }}" value="\{\{ old }}" \/\>
38
-
</label>
39
-
\{\{ /fields }}
40
-
\{\{ /form:create }}
35
+
{{ form:create in="superfans" }}
36
+
{{ fields }}
37
+
<label>{{ display }}
38
+
<input type="text" name="{{ field }}" value="{{ old }}" \>
0 commit comments