Skip to content

Commit 6774aa6

Browse files
committed
Make server redirection more precise
1 parent 1ef1e3f commit 6774aa6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const expressStaticGzip = require("express-static-gzip");
66

77
var app = express();
88

9-
app.use(redirectToHTTPS([/localhost:(\d{4})/], [], 301));
9+
app.use(redirectToHTTPS([/^localhost:?\d*$/, /^127.0.0.1:?\d*$/], [], 301));
1010

1111
app.use(
1212
expressStaticGzip(__dirname, {

0 commit comments

Comments
 (0)