discourse/public/javascripts
Gina Haeussge f0fc38418c FEATURE: Support referrerPolicy on embed iframe
This commit adds a new property "discourseReferrerPolicy" to the
set of supported configuration properties for the comment embed
script. If provided the value will be used to set the "referrerPolicy"
attribute on the iframe created to display the comments. This in turn
will allow embedding pages to define a more lenient referer policy on
the embed iframe for pages whose default policy is so strict it
keeps the comment embed from working.

Example:

  * Setup:
    * Discourse hosted at discourse.example.com
    * Comments embedded at example.com
    * Referrer-Policy at example.com set to 'same-origin'
  * Without this commit:
    * Loading the comments fails due to the referer being empty
  * With this commit and no adjusted configuration:
    * Loading the comments fails due to the referer being empty
      (= same behaviour as without the commit)
  * With this commit and DiscourseEmbed.discourseReferrerPolicy =
    'no-referrer-when-downgrade' as additional configuration:
    * Loading the comments succeeds

Note that this change is of special interest for embedding pages
wanting to restrict data flows under the terms of the GDPR since
it allows selectively whitelisting comment embeds while preventing
referer leaking by default.
2018-06-25 14:59:34 +10:00
..
ace Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
Chart.min.js EXPERIMENTAL: new dashboard UI 2018-04-16 10:42:06 +02:00
count.js FIX: More safety when displaying link counts on blogs 2014-05-20 15:20:33 -04:00
embed.js FEATURE: Support referrerPolicy on embed iframe 2018-06-25 14:59:34 +10:00
highlight.pack.js UPGRADE: highlight js to latest from master 2014-09-24 13:03:30 +10:00
jquery.magnific-popup.min.js Use image gallery feature of magnific 2017-04-25 11:23:15 +09:00
pikaday.js update pikaday.js 2017-06-23 17:50:13 +02:00
spectrum.css (S)CSS cleanup: 0px => O and removal of duplicated properties (#5526) 2018-01-25 09:53:36 -05:00
spectrum.js FEATURE: Native theme support 2017-04-12 10:53:49 -04:00