• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 Removing Console Errors From Google Ads

DieselMinded

Well-known member
#4
Looks like the solution is on this page : https://developers.google.com/interactive-media-ads/docs/sdks/html5/ads#cors

i read it and think i need to add some code to allow ..

Cross-Origin Resource Sharing (CORS) headers is a W3C draft specification meant to allow sharing across different origins. To be servable in a JavaScript environment a VAST ad server’s response must include the following HTTP CORS headers:

Code:
Access-Control-Allow-Origin: <origin header value>     
Access-Control-Allow-Credentials: true
This HTTP header allows an ads player on any origin to read the VAST response from the ad server origin. The value of Access-Control-Allow-Origin: should be the value of the Origin header sent with the ad request. The Access-Control-Allow-Credentials: header will ensure that cookies will be sent and received properly.

this is to make me able to show https// elements on a http// page with safari browser

so i know what i need to do (sort of) just don't know how to implement :(
 

DieselMinded

Well-known member
#5
sounds like we are the deer in the headlights when it comes to https and the future of sites with log in forms, how ever we already have some major issues as some browsers now see any https element displayed on a non https page as an error/threat

for example google ads on safari browser trigger console errors for pulling secured content and displaying on non secure pages

my question is can we pull some trickerys and stick the ads in some sort of ssl iframes?

how about our log in forms?

maybe the only solution is for everyone of us to move to https now before its too late?
 

DieselMinded

Well-known member
#7
i changed my ads from...

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

to

<script src="//pagead2.googlesyndication.com/pagead/show_ads.js"></script>

and my ads are not showing now
 

CTXMedia

Formerly CyclingTribe
#8
You didn't need to change them as you were already using the protocol-less code - i.e. no ="http: or ="https: at the start of the src line, just ="// (y)

I've just tried to access your site via - https://www.mymilitia.com/ and get an invalid certificate error: The certificate is only valid for the following names: *.myhsphere.cc, myhsphere.cc

Have you temporarily disabled it?
 

DieselMinded

Well-known member
#10
You didn't need to change them as you were already using the protocol-less code - i.e. no ="http: or ="https: at the start of the src line, just ="// (y)

I've just tried to access your site via - https://www.mymilitia.com/ and get an invalid certificate error: The certificate is only valid for the following names: *.myhsphere.cc, myhsphere.cc

Have you temporarily disabled it?
I'm trying to keep this errors from triggering...

666.png
 

CTXMedia

Formerly CyclingTribe
#11
I misunderstood - I thought you were trying to convert your site to https. Unfortunately I don't have a Mac so can't really help with the Safari mixed-content issue, sorry.
 

CTXMedia

Formerly CyclingTribe
#13
@DieselMinded - do any of your XF ad templates use iframe or does your theme wrap them in an iframe at all? If you search your templates for iframe do any of your ad templates come up in the results?