electerious/Ackee

Hosting my website on netlify makes requests from preview builds logged

orangecoloured opened this issue · 6 comments

🐞 Describe the bug

I have ackee and my website both hosted on netlify.

ACKEE_ALLOW_ORIGIN="https://rckt.cc"
ACKEE_AUTO_ORIGIN="false"

But I see requests logged from the preview builds.

📚 To Reproduce

Probably have the tracked app hosted on netlify and see this happening on deploy?

💡 Expected behavior

I expected that the whitelisted origins prevent loggin requests from other sources.

🖼️ Screenshots

image

⚙️ Environment

  • Installation: Netlify
  • Ackee version: 3.4.1

Another deploy, another logged vist

image

That's strange. Can you check if Ackee sends the correct CORS headers? Is the visit logged by a browser or by the deployment system? Scripts might ignore the CORS headers.

Looks like it's logged by the deployment system.
When I visit the deployed snapshot I get proper response

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://ackee.rckt.cc/api. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 204.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://ackee.rckt.cc/api. (Reason: CORS request did not succeed). Status code: (null).

Btw, I have a check for window object for initialisation and tracking. So, weird if it's a request that's happening on the "backend" side.

Hello, I have exactly the same issue, let me know if I can give more details to help for the investigation

Same issue here. Give me a shout and I'll post what ever info is helping to debug this :) Thank you for an awesome analytics tool!