Jump to content

CORS Error When URL Ends Question Mark

Recommended Posts

Im having a problem when trying to load an ad from my site when my site's URL ends with a question mark.

For example if I load my ad inside the following site http://www.example.com then the ads work correctly. However if for any reason the URL ends with a question mark as such http://www.example.com? , then I get CORS errors that seem to be coming from Revive's `/delivery/asyncspc.php` . 

Would this be considered a bug that needs to be opened on Github, or is this the correct place for it?

Share this post

Link to post
Share on other sites

Hello Ian. Thanks for following up. We are not intentionally making our system create links to URLs with a question mark in the end, but in certain occasions we do pass parameters via a URL query string as such http://example.com?customer=1  and sometimes, for whatever reason (maybe the user copies and pastes section of the URL), it gets copied without the query string but with the question mark lingering at the end of the URL. It's on those occasions when we see the error come up. That error being a JS error in the browser's console that looks like this

Access to XMLHttpRequest at 'https://myadserver.com/live/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=https%3A%2F%2Fwww.clientsite.com%2Fresults.aspx%3F' from origin 'https://www.clientsite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I replaced the domain names for my privacy, but notice the %3F at the end of https://myadserver.com/live/www/delivery/asyncspc.php?zones=1&prefix=revive-0-&loc=https%3A%2F%2Fwww.clientsite.com%2Fresults.aspx%3F . That represents the question mark I mentioned above. Would that be the cause of this problem? 

Please let me know if you need more information.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now