diff --git a/HISTORY.md b/HISTORY.md index 6b58456..fde1d72 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,9 @@ +1.16.0 / 2024-09-10 +=================== + +* Remove link renderization in html while redirecting + + 1.15.0 / 2022-03-24 =================== diff --git a/index.js b/index.js index b7d3984..3f3e64e 100644 --- a/index.js +++ b/index.js @@ -195,8 +195,7 @@ function createRedirectDirectoryListener () { // reformat the URL var loc = encodeUrl(url.format(originalUrl)) - var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + - escapeHtml(loc) + '') + var doc = createHtmlDocument('Redirecting', 'Redirecting to ' + escapeHtml(loc)) // send redirect response res.statusCode = 301 diff --git a/package.json b/package.json index 9d935f5..47d9789 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "serve-static", "description": "Serve static files", - "version": "1.15.0", + "version": "1.16.0", "author": "Douglas Christopher Wilson ", "license": "MIT", "repository": "expressjs/serve-static", diff --git a/test/test.js b/test/test.js index e1e3fd1..7bce038 100644 --- a/test/test.js +++ b/test/test.js @@ -483,7 +483,7 @@ describe('serveStatic()', function () { request(server) .get('/users') .expect('Location', '/users/') - .expect(301, //, done) + .expect(301, /\/users\//, done) }) it('should redirect directories with query string', function (done) { @@ -505,7 +505,7 @@ describe('serveStatic()', function () { .get('/snow') .expect('Location', '/snow%20%E2%98%83/') .expect('Content-Type', /html/) - .expect(301, />Redirecting to \/snow%20%E2%98%83\/<\/a>Redirecting to \/snow%20%E2%98%83\/ pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy