Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@
"description": "Shared secret for JWT auth tokens",
"required": false
},
"MITOL_NOINDEX": {
"description": "Prevent search engines from indexing the site",
"required": false
},
"MITOL_SECURE_SSL_REDIRECT": {
"description": "Application-level SSL redirect setting.",
"value": "True",
Expand Down
3 changes: 3 additions & 0 deletions frontends/mit-learn/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<% if (MITOL_NOINDEX) { %>
<meta name="robots" content="noindex" />
<% } %>
<!--
Font files for Adobe Neue Haas Grotesk.
WARNING: This is linked to chudzick@mit.edu's Adobe account.
Expand Down
6 changes: 6 additions & 0 deletions frontends/mit-learn/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const {
SENTRY_PROFILES_SAMPLE_RATE,
CSRF_COOKIE_NAME,
APPZI_URL,
MITOL_NOINDEX,
} = cleanEnv(process.env, {
NODE_ENV: str({
choices: ["development", "production", "test"],
Expand Down Expand Up @@ -119,6 +120,10 @@ const {
desc: "URL for the Appzi feedback widget",
default: "",
}),
MITOL_NOINDEX: bool({
desc: "Whether to include a noindex meta tag",
default: true,
}),
})

const MITOL_FEATURES_PREFIX = "FEATURE_"
Expand Down Expand Up @@ -216,6 +221,7 @@ module.exports = (env, argv) => {
template: "public/index.html",
templateParameters: {
APPZI_URL,
MITOL_NOINDEX,
},
}),
new CopyPlugin({
Expand Down
3 changes: 3 additions & 0 deletions main/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -763,3 +763,6 @@ def get_all_config_keys():
name="POSTHOG_PROJECT_ID",
default=None,
)

# Enable or disable search engine indexing
MITOL_NOINDEX = get_bool("MITOL_NOINDEX", True) # noqa: FBT003