Skip to content

Commit

Permalink
gate font plugin from only serving files
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Jul 31, 2024
1 parent f1090bf commit e237f50
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cli/src/plugins/resource/plugin-standard-font.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class StandardFontResource extends ResourceInterface {
}

async shouldServe(url) {
return this.extensions.indexOf(url.pathname.split('.').pop()) >= 0;
const { pathname, protocol } = url;

return this.extensions.indexOf(pathname.split('.').pop()) >= 0 && protocol === 'file:';
}

async serve(url) {
Expand Down

0 comments on commit e237f50

Please sign in to comment.