feat: add tracker.js cache control
This commit is contained in:
parent
31ba529022
commit
6f17859759
@ -41,6 +41,13 @@ app.use(passport.initialize());
|
|||||||
// http://expressjs.com/en/advanced/best-practice-security.html#at-a-minimum-disable-x-powered-by-header
|
// http://expressjs.com/en/advanced/best-practice-security.html#at-a-minimum-disable-x-powered-by-header
|
||||||
app.disable('x-powered-by');
|
app.disable('x-powered-by');
|
||||||
|
|
||||||
|
app.use(
|
||||||
|
'/tracker.js',
|
||||||
|
express.static('./public/tracker.js', {
|
||||||
|
maxAge: '7d',
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
app.use('/api/website', websiteRouter);
|
app.use('/api/website', websiteRouter);
|
||||||
app.use('/api/workspace', workspaceRouter);
|
app.use('/api/workspace', workspaceRouter);
|
||||||
app.use('/telemetry', telemetryRouter);
|
app.use('/telemetry', telemetryRouter);
|
||||||
|
Loading…
Reference in New Issue
Block a user