fix: fix custom tracker script file route error in production
This commit is contained in:
parent
5d8c18716a
commit
2a3e2af528
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,5 @@
|
|||||||
.env
|
.env
|
||||||
public/tracker.js
|
src/client/public/tracker.js
|
||||||
geo
|
geo
|
||||||
|
|
||||||
# Logs
|
# Logs
|
||||||
|
@ -50,7 +50,7 @@ app.use('/trpc', trpcExpressMiddleware);
|
|||||||
|
|
||||||
if (env.customTrackerScriptName) {
|
if (env.customTrackerScriptName) {
|
||||||
app.get(`/${env.customTrackerScriptName}`, (req, res) =>
|
app.get(`/${env.customTrackerScriptName}`, (req, res) =>
|
||||||
res.sendFile(path.resolve(__dirname, './public/tracker.js'))
|
res.sendFile(path.resolve(process.cwd(), './public/tracker.js'))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user