-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
68d0ba5
commit 0816308
Showing
8 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<head> | ||
<meta name="fragment" content="!"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<noscript><div style="padding: 40px; font-size: 200%; text-align: center;">This site requires JavaScript. Please enable it in your browser settings.</div></noscript> | ||
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
imports/plugins/core/layout/client/templates/layout/notFound/notFound.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
import { Template } from "meteor/templating"; | ||
|
||
Template.notFound.onCreated(function () { | ||
document.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend", "<meta name='prerender-status-code' content='404'>"); | ||
// todo report not found source | ||
}); |
6 changes: 6 additions & 0 deletions
6
imports/plugins/core/layout/client/templates/layout/notice/unauthorized.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { Template } from "meteor/templating"; | ||
|
||
Template.unauthorized.onCreated(function () { | ||
document.getElementsByTagName("head")[0].insertAdjacentHTML("beforeend", "<meta name='prerender-status-code' content='403'>"); | ||
// todo report not found source | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import prerender from "prerender-node"; | ||
import { WebApp } from "meteor/webapp"; | ||
import { Logger } from "/server/api"; | ||
|
||
export default function () { | ||
if (process.env.PRERENDER_TOKEN && process.env.PRERENDER_HOST) { | ||
prerender.set("prerenderToken", process.env.PRERENDER_TOKEN); | ||
prerender.set("host", process.env.PRERENDER_HOST); | ||
prerender.set("protocol", "https"); | ||
WebApp.rawConnectHandlers.use(prerender); | ||
Logger.info("Prerender Initialization finished."); | ||
} | ||
} |