Skip to content

Commit

Permalink
Fix Express.js regex for docs & blog (#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
endiliey authored and JoelMarcey committed Jun 7, 2018
1 parent ff93ba9 commit 46661c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function execute(port) {
// handle all requests for document pages
const app = express();

app.get(/^\/docs\/.*html$/, (req, res, next) => {
app.get(/\/docs\/.*html$/, (req, res, next) => {
let url = req.path.toString().replace(siteConfig.baseUrl, '');

// links is a map from a permalink to an id for each document
Expand Down Expand Up @@ -272,7 +272,7 @@ function execute(port) {
});

// Handle all requests for blog pages and posts.
app.get(/^\/blog\/.*html$/, (req, res) => {
app.get(/\/blog\/.*html$/, (req, res) => {
// Regenerate the blog metadata in case it has changed. Consider improving
// this to regenerate on file save rather than on page request.
reloadMetadataBlog();
Expand Down

0 comments on commit 46661c8

Please sign in to comment.