1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Make sure /static/ and /_next/ are valid internal urls. (#2631)

This commit is contained in:
Arunoda Susiripala 2017-07-24 10:04:06 +05:30 committed by GitHub
parent 00e2659d28
commit c03c86ee5e

View file

@ -171,12 +171,12 @@ export default class Server {
await renderScript(req, res, page, this.renderOpts)
},
'/_next/:path+': async (req, res, params) => {
'/_next/:path?': async (req, res, params) => {
const p = join(__dirname, '..', 'client', ...(params.path || []))
await this.serveStatic(req, res, p)
},
'/static/:path+': async (req, res, params) => {
'/static/:path?': async (req, res, params) => {
const p = join(this.dir, 'static', ...(params.path || []))
await this.serveStatic(req, res, p)
}