Closed REOLDEV closed 2 years ago
Hello!
Could you show us the code snippet where JS tag it's been called? It seems that tracker is loaded (as you show into your screenshot), but not executed.
I implemented it into a Software called "Woltlab Suite Core";
<script async="" src="https://ackee.reol.dev/tracker.js" data-ackee-server="https://ackee.reol.dev" data-ackee-domain-id="2d140384-c944-44b0-8a75-6c574dee8d75" data-ackee-opts="{ 'ignoreOwnVisits': false, 'detailed': true}"></script>
Okay.. i tried it with an Blank HTML File; Now it loads and i get CORS Errors... i hate cors (Because i dont understand it lol)
"Access to XMLHttpRequest at 'https://ackee.reol.dev/api' from origin 'https://sa-mp.cc/' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The 'Access-Control-Allow-Origin' header contains the invalid value '1'."
`map $http_origin $origin_allowed { default 0; https://sa-mp.cc 1; .sa-mp.cc 1; reol.dev 2; .reol.dev 2;
}
server {
server_name ackee.reol.dev;
location / {
add_header Access-Control-Allow-Origin "$origin_allowed" always;
`
After several days of ramming my head into the table.. i found the solution...
add_header Access-Control-Allow-Origin "$origin_allowed" always; to add_header Access-Control-Allow-Origin "$http_origin" always;
Now i only have to fix the bug with Woltlab
@REOLDEV Great to hear that you found a solution. I'm closing this issue, because it seems to be a server configuration issue, not an issue of Ackee itself.
Here are a few more related resources: https://github.com/electerious/Ackee/blob/master/docs/CORS%20headers.md https://github.com/electerious/Ackee/blob/master/docs/SSL%20and%20HTTPS.md
🐞 Describe the bug
So, i Set it up via Docker on an Oracle Cloud Server; Web Webpage seems to work and i can call the tracker.js When i try to test it there is no data logged; I noticed that i dont get a "preflight" and also no api calls.
📚 To Reproduce
Installed Ackee v3.3.0 via Docker on an Ampere (ARM) Based server; Setup DNS via Cloudflare - no proxying; embedded the Tracking code on my Website
💡 Expected behavior
Counters should go up.
🖼️ Screenshots
⚙️ Environment
📋 Additional context I also tried it with an external MongoDB Collection - Database connection seems to work. Yes, i did the nginx proxying thing with a "*" Wildcard for CORS