Skip to content
Source
Sign inSign up
fuko/rive-preview-player

Add favicon and unofficial-project notice #3

Mergedfukomerged 2 commits intomain fromrefs/pull/3/headmerged by fuko View on GitHub

Showing 6 changed files with 2 additions and 1 deletion (loading 3).

x
0 of 6 viewed, 6 left
0 additions and 0 deletionsassets/icon.pngAdded
View file

Binary file. Open the Preview tab to see it.

2 additions and 1 deletionlib/server.mjsModified
View file
@@ -245,8 +245,9 @@
const origin = req.headers.origin;
if (origin && origin !== `http://${host}`) return res.writeHead(403).end('forbidden origin');
​
+ if (p === '/favicon.ico') return this.serveFile(res, path.join(PLAYER_DIR, 'icon-32.png'));
if (p === '/' || p === '/index.html') return this.serveFile(res, path.join(PLAYER_DIR, 'index.html'));
- if (p === '/app.js' || p === '/style.css') return this.serveFile(res, path.join(PLAYER_DIR, p.slice(1)));
+ if (p === '/app.js' || p === '/style.css' || p === '/icon-32.png' || p === '/icon-192.png') return this.serveFile(res, path.join(PLAYER_DIR, p.slice(1)));
if (p.startsWith('/vendor/rive/')) {
const name = path.basename(p);
if (!/^[\w.-]+\.(mjs|wasm)$/.test(name)) return res.writeHead(404).end();
0 additions and 0 deletionsplayer/icon-192.pngAdded
View file

Binary file. Open the Preview tab to see it.

player/icon-32.pngAdded
View file
Loading the diff