Hi.
I've recently installed Flarum on my VPS, and I found that the CDN we used in this forum is not accessible in my district.
I wonder how do I change this CDN to another one, or how could I edit the core to get rid of the CDN?
Thanks!
How do I change the CDN used in my flarum?
There's an issue reported related to this: https://github.com/flarum/core/issues/822
- Edited
luceos Thanks! my question here is that I wonder if there is a way to customize the forum and change the CDN chosen by flarum to another one. I've installed flarum with composer already.
UPD:: Fixed http://discuss.flarum.org.cn/d/424
Note that this can now be achieved without hacking core (via a custom extension) with the following code:
$events->listen(ConfigureClientView::class, function (ConfigureClientView $event) {
$event->view->addHeadString('<link rel="stylesheet" href="path/to/webfont">', 'font');
});
This will overwrite the Google webfonts <link>
tag with whatever you specify.
Toby Wouldn't this just add another font on top of the old one, making 2 calls instead of one?
- Edited
webflashing Because the second argument in addHeadString
is set to "font", it will overwrite the default font link tag.