Jump to content

CORS Error When URL Ends Question Mark


diego

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?

Link to comment
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.

Link to comment
Share on other sites

  • 2 months later...

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...