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:
parent
00e2659d28
commit
c03c86ee5e
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue