Closed abcnet-lu closed 3 years ago
Hi @abcnet-lu, Interesting! I'll take a closer look into this as soon as I can. Off the top of my head it looks as if Censor Dodge is not respecting "./" as a path relative to the style.css file, so is using the root domain assuming that's the correct location.
I'll let you know if I can get an update on this!
Thanks, Ryan
Hi @abcnet-lu, I just took a closer look, and believe I've found a solution which should solve the woff2 and relative path problems you found.
I'll be merging this into master soon, but if you wanted to check this out early and give it a test for yourself, you can here:
https://github.com/ryanmab/CensorDodge/tree/woff2-support
Thank you for your help so far!
Thanks, Ryan
Dear @ryanmab
First of all thank you for this proxy, it's really a piece of jewellery and finally a great replacement for glype which is not maintained for a couple of years now.
I've ran into a really tricky issue, and couldn't solve it.
Support of fonts woff2
Steps to reproduce:
Outcome: The resource
Inter-upright-var.woff2
is not found (404), not proxied and resolves locally instead of via proxy.Additionally, error console:
downloadable font: download failed (font-family: "Inter var" style:normal weight:100..900 stretch:100 src index:0): status=2147746065 source: [hidden]/assets/fonts/inter/Inter-upright-var.woff2
Caused by
https://kikolani.com/wp-content/themes/twentytwenty/style.css?ver=1.0.1
Support of fonts woff2 after patching
Steps to reproduce:
includes/class.censorDodge.php
with"font/*" => array("ttf","otf","woff","woff2","eot"),
to supportwoff2
Outcome: The resource
Inter-upright-var.woff2
is proxied and does not resolve locally anymore, but is not proxied properly.Additionally, error console:
downloadable font: rejected by sanitizer (font-family: "Inter var" style:normal weight:100..900 stretch:100 src index:0) source: [hidden]/?cdURL=aHR0cHM6Ly9raWtvbGFuaS5jb20vYXNzZXRzL2ZvbnRzL2ludGVyL0ludGVyLXVwcmlnaHQtdmFyLndvZmYy
Caused by improper proxification of
Log:
It tries to resolve to
https://kikolani.com/assets/fonts/inter/Inter-upright-var.woff2
instead ofhttps://kikolani.com/wp-content/themes/twentytwenty/assets/fonts/inter/Inter-upright-var.woff2
(it appears that the proxification of a relative URL in the CSS is not made from the path where the CSS is hosted while it should).Conclusion
If someone manages to fix this, kudos, because it sounds quite tricky and complicated. A real challenge.
Thank you and best regards.
Alexandre