Skip to content

Commit

Permalink
fix meta redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
ef4 committed Feb 12, 2018
1 parent 93a95b6 commit a56ed15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/prerender.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class Prerender extends Plugin {
} else if (page.statusCode >= 300 && page.statusCode < 400){
let location = page.headers.headers.location[0];
let redirectTo = new URL(location, `http://${host}${this.rootURL}`).pathname;
let html = `<meta http-equiv="refresh" content="0"; url="${redirectTo}"><link rel="canonical" href="${redirectTo}" />`;
let html = `<meta http-equiv="refresh" content="0;url=${redirectTo}"><link rel="canonical" href="${redirectTo}" />`;
await this._writeFile(url, html);
this.ui.writeLine(`pre-render ${url} ${chalk.yellow(page.statusCode)} ${location}`);
return true;
Expand Down

0 comments on commit a56ed15

Please sign in to comment.