Skip to content

Commit 5450a92

Browse files
committed
update docs for the subscription widget
1 parent c9f1028 commit 5450a92

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,21 +234,21 @@ Edit [mailtrain.conf](setup/mailtrain.conf) (update application folder) and copy
234234

235235
The (experimental) Mailtrain Subscription Widget allows you to embed your sign-up forms on your website. To embed a Widget, you need to:
236236

237-
Enable cross-origin resource sharing in your `config` file and whitelist your site:
237+
Enable cross-origin resource sharing in your `server/config/local.yaml` file (you may need to create it if it doesn't exist) and whitelist your site:
238238

239239
```
240-
[cors]
241-
# Allow subscription widgets to be embedded
242-
origins=['https://www.example.com']
240+
cors:
241+
# Allow subscription widgets to be embedded
242+
origins=['https://www.example.com']
243243
```
244244

245-
Embed the widget code on your website:
245+
Embed the widget code on your website using the untrusted endpoint:
246246

247247
```
248-
<div data-mailtrain-subscription-widget data-url="http://domain/subscription/Byf44R-og/widget">
249-
<a href="http://domain/subscription/Byf44R-og">Subscribe to our list</a>
248+
<div data-mailtrain-subscription-widget data-url="http://lists.example.com/subscription/Byf44R-og/widget">
249+
<a href="http://lists.example.com/subscription/Byf44R-og">Subscribe to our list</a>
250250
</div>
251-
<script src="http://domain/subscription/widget.js"></script>
251+
<script src="http://lists.example.com/static/subscription/widget.js"></script>
252252
```
253253

254254
## Cloudron

0 commit comments

Comments
 (0)