allow disabling the 3rd party cookies check
This commit is contained in:
parent
185244f0e7
commit
f383a2e1b3
|
@ -128,7 +128,8 @@ class Travis::Api::App
|
||||||
# token is being received.
|
# token is being received.
|
||||||
get '/post_message', scope: :public do
|
get '/post_message', scope: :public do
|
||||||
content_type :html
|
content_type :html
|
||||||
erb :container
|
data = { check_third_party_cookies: !Travis.config.auth.disable_third_party_cookies_check }
|
||||||
|
erb(:container, locals: data)
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/post_message/iframe', scope: :public do
|
get '/post_message/iframe', scope: :public do
|
||||||
|
@ -382,6 +383,7 @@ function main() {
|
||||||
var url = window.location.pathname + '/iframe' + window.location.search;
|
var url = window.location.pathname + '/iframe' + window.location.search;
|
||||||
|
|
||||||
function thirdPartyCookies(yes, no) {
|
function thirdPartyCookies(yes, no) {
|
||||||
|
<%= "return no();" unless check_third_party_cookies %>
|
||||||
window.cookiesCheckCallback = function(enabled) { enabled ? yes() : no() };
|
window.cookiesCheckCallback = function(enabled) { enabled ? yes() : no() };
|
||||||
var img = document.createElement('img');
|
var img = document.createElement('img');
|
||||||
img.src = "https://third-party-cookies.herokuapp.com/set";
|
img.src = "https://third-party-cookies.herokuapp.com/set";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user