server: fix allowed extension regexp, explicitely allow mjs src files
This commit is contained in:
parent
db85c42989
commit
3263cf2ff1
1 changed files with 2 additions and 1 deletions
|
|
@ -244,7 +244,8 @@ class WebServer extends EventEmitter {
|
|||
url = url.replace('_:_', ':') // escaped drive colon
|
||||
url = url.replace(/^\/([^/]*:)/, '$1') // strip leading slash
|
||||
|
||||
if (url.match(/.(svg|jpg|jpeg|png|apng|gif|webp|tiff|xbm|bmp|ico|ttf|otf|woff|woff2|html|css|js)(\?[0-9]*)?$/i)) {
|
||||
if (url.match(/\.(svg|jpg|jpeg|png|apng|gif|webp|tiff|xbm|bmp|ico|ttf|otf|woff|woff2|html|css|js)(\?[0-9]*)?$/i) ||
|
||||
url.match(/\.mjs$/) && !this.prod) {
|
||||
|
||||
// Resolution order: session path, theme path, absolute path
|
||||
var id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue