rsnext/test/integration/trailing-slashes-rewrite/server.js
JJ Kasper e1e6cfa189
Fix page checking failing with trailingSlash (#16362)
This fixes page checking failing due to the trailing slash being present which causes pages to proxied by a rewrite when they shouldn't be. This also adds additional tests to ensure rewriting to an external resource is working correctly with `trailingSlash: true`

Fixes: https://github.com/vercel/next.js/issues/15700
2020-08-20 04:05:38 +00:00

10 lines
259 B
JavaScript

const http = require('http')
const server = http.createServer((req, res) => {
console.log('got request', req.url)
res.end(req.url)
})
const port = process.env.PORT || 3000
server.listen(port, () => {
console.log('Ready on http://localhost:' + port)
})