Jump to content

'Access-Control-Allow-Origin'must not be the wildcard when credentials mode is 'include'


Maro

Recommended Posts

 

Hello,

i want do display HTML5 Ads with Revive Adserver 4.1.1. They show up in the inventory and are fine. The zone is set to "Asynchronus JS Tag".

The Adservers hostname is like a subdomain of the domain that should show the ads. Like adserver.example.com

On example.com, i get these errors (only when HTML5 is delivered, image banners working well):

(index):1 Failed to load https://adserver.example.com/www/delivery/asyncspc.php?zones=5|9|10|11|9|11|9|9&prefix=revive-0-&loc=https%3A%2F%2Fexample.com%2F&referer=https%3A%2F%2Fexample.com%2F: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. Origin 'https://example.com' is therefore not allowed access. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

 

I have tried to disable plugins and to add Header set Access-Control-Allow-Origin "example.com" as additional directives for HTTP and HTTPS in Plesk. After that, the error message read something like "There are more than one Origins specified..."

I haven't found any working tips, maybe anyone here can help me. Some wanted to change the  Thanks in advance.

maro

Link to comment
Share on other sites

"as named", i mean.

 

I wonder where "*" is specified. But i think, i should get rid of the credential thing? Where is this specified, and why it is set to "include"?

 

I found h.withCredentials = true; in async.js and have set it to false. On example.com, the error continues.

The strange thing is, on a second test domain the HTML5 ad is showing up and working properly even with "h.withCredentials = true;" in async.js

Edited by Maro
New things
Link to comment
Share on other sites

Thanks for replying.

English is not my mother tongue, so i want to ask what you you mean:

currently my webserver is overwriting the header sent by revive, or should i make, that my webserver is overwriting the header sent by revive?

 

Is this problem there, because revive is located at a subdomain of the website that should show that HTML5 banners? 

Edited by Maro
Link to comment
Share on other sites

i have to figure out how to change that. i can only give additionaly directions. 

 

Is this problem there, because revive is located at a subdomain of the website that should show that HTML5 banners? becaus at another domain the ads are showing up, but this site i on another webserver (but same standard config by plesk).

I have just tested on another website on the same server. The ad is delivered!

So is this no server wide problem? Maybe the header is overwritten by a plugin of wordpress? 

Link to comment
Share on other sites

So i have to remove the wildcard, because revive set the header itself? But from where comes the wildcard? I think Plesk isn't set the wildcard as a default.

Now it say something like
"the value of Access...Origin... header must not be the wildcard "*", the origin https://example.com is therefore not allowed"

When i set it in plesk an wildcard "*" just for testing, is say 
"header contains multiple values 'https://example.com, *', but only one is allowed...."

 

Where comes the wildcard from?

Can you give me assistance, @Matteo Beccati? I would like to pay you.

Edited by Maro
Link to comment
Share on other sites

I have now changes the URL of the adserver from adserver.example.com to adserver.anotherdomain.com.

I still get the same error. The Invocation Code is still working on other domains than example.com, all banners are showing up! Still no HTML5 banners for example.com.

I don't get it! It drives me crazy. And the one HTML5 banner, that was working (sometimes) isn't working anymore.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...