Allows to set CORS-headers as specified in https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS.
It will also setup the infrastructure in order to receive OPTIONS requests send to path
.
1 2 3 |
jug |
the jug instance |
path |
the path to bind to |
allow_methods |
a vector of allowed methods |
allow_origin |
the allowed origin |
allow_credentials |
either |
allow_headers |
a vector of allowed headers |
max_age |
in seconds |
expose_headers |
a vector of exposed headers |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.