Skip to content

Commit

Permalink
Dockerfile: disable file URLs loading in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
pablo-mayrgundter committed Aug 6, 2024
1 parent bfd6ef7 commit acd9f6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export async function load(

let modelData
const urlStr = url.toString()
if (urlStr.startsWith('file://')) {
if (urlStr.startsWith('file://') && process.env.APP_ENV !== 'prod') {
const path = urlStr.substring('file://'.length)
const stats = fs.statSync(path)
const fileSize = stats.size
Expand Down

0 comments on commit acd9f6f

Please sign in to comment.