Consent-O-Matic
Consent-O-Matic copied to clipboard
Feature suggestion: Custom rules without debug output
Trying to write my first custom rule, a minimal use case, I noticed there isn't any debug output available, which isn't helpful.
Indication "keep running on
The extension should offer some guidance:
- any matching rule?
- parsing errors on loading lists/rules
- show total count of rules added/updated
- show feedback on manual update
- and ideally a debug log (on demand)
Right now it's pretty much fishing in the dark, and I'm used to manipulating the DOM.
There is a secret debug menu, see this post for info:
https://github.com/cavi-au/Consent-O-Matic/issues/81#issuecomment-1172853185
We should probably make it less hidden.
Thanks a lot dkgof. Found it now. For some odd reason the button renders "hidden" on my firefox (screenshot attached).
Is there a problem with adding custom URLs? I always get debug output "ConsentEngine loaded 0 of 0 rules". Tried about everything I can think of (including serving a copy of the default list). My rules.json is not hosted on github.
I reckon we need feedback on clicking the "Update Rules Now" button. Plus perhaps a button "clear all caches".
Thanks for your efforts!
I just tried hosting a small sample rule somewhere, and it works for me :/
Could you perhaps share the rule you are trying to fetch, or even the link? (Or maybee put the rule somewhere like pastebin to test)
I tried hosting my small test rule on pastebin, so you can test:
https://pastebin.com/raw/AkduXvrE
Thanks dkgof, appreciate your help. Tried the link you posted in my default firefox, and a non-modified firefox without any other extensions. Tried putting the rule, the rule list (also hosted on pastebin: https://pastebin.com/raw/WFmUbFca), and both.
Find the screenshots here - it always says 0 loaded.
I think i managed to pinpoint the problem.
It seems that pastebin raw, does not include "Access-Control-Allow-Origin" header, so the browser is blocking access to the list because of CORS.
Apparently this is not the behaviour in Chrome.
The default list served from github raw, does have the header and that is why its working.
Thanks so much, that's exactly it.
Consent-O-Matic (nginx)
location ~ ^/pub/COM/(.*)$ {
location ~ \.json$ {
access_log /dev/null;
error_log /dev/null;
add_header Access-Control-Allow-Origin *;
types { } default_type "text/plain; charset=utf-8";
}
}
The dev menu is a bit more visible now and it seems like the CORS fetching issue was resolved, so I'll close this issue