Skip to content

Commit 9b4a9a5

Browse files
committed
Add detailed warnings to SSR-related configs about impact on SEO.
1 parent a52ba24 commit 9b4a9a5

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

config/config.example.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ ui:
88
ssl: false
99
host: localhost
1010
port: 4000
11-
# Specify the public URL that this user interface responds to. This corresponds to the "dspace.ui.url" property in your backend's local.cfg.
12-
# SSR is only enabled when the client's "Host" HTTP header matches this baseUrl. The baseUrl is also used for redirects and SEO links (in robots.txt).
11+
# Specify the public baseURL that this user interface responds to. This corresponds to the "dspace.ui.url" property in your backend's local.cfg.
12+
# [WARNING] SSR is only enabled when the client's "Host" HTTP header matches this baseUrl. The baseUrl is also used for redirects and SEO links (in robots.txt).
13+
# If the baseUrl is invalid/incorrrect, then search engine crawlers (like Google Scholar) will not be able to index your site.
14+
# The baseUrl is required by Angular to protect against SSRF attacks like those described in CVE-2026-27739.
1315
baseUrl: http://localhost:4000
1416
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
1517
nameSpace: /
@@ -30,8 +32,11 @@ ssr:
3032
# disabled (false) by default to boost server performance at the expense of loading smoothness.
3133
inlineCriticalCss: false
3234
# Patterns to be run as regexes against the path of the page to check if SSR is allowed.
33-
# If the path match any of the regexes it will be served directly in CSR.
35+
# If the path match any of the regexes it will be served directly in CSR (i.e. SSR will be disabled for this path).
3436
# By default, excludes community and collection browse, global browse, global search, community list, statistics and various administrative tools.
37+
# [WARNING] changing these settings may impact your Search Engine Optimization (SEO). Any paths listed in "excludedPathPatterns"
38+
# may NOT be indexable by search engine crawlers (like Google Scholar). For search engine crawlers to fully index your site,
39+
# this "excludePathPatterns" should NEVER exclude SSR from the homepage, community/collection pages or item/entity pages.
3540
excludePathPatterns:
3641
- pattern: "^/communities/[a-f0-9-]{36}/browse(/.*)?$"
3742
flag: "i"

src/environments/environment.production.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,17 @@ export const environment: Partial<BuildConfig> = {
55

66
// Angular SSR (Server Side Rendering) settings
77
ssr: {
8+
// WARNING: Disabling SSR will block major search engine crawlers (like Google Scholar) from indexing your site.
9+
// Therefore, we highly recommend keeping SSR enabled at all times. However, for better performance, you may choose
10+
// to minimize the paths that undergo SSR via the "excludePathPatterns" setting below.
811
enabled: true,
912
enablePerformanceProfiler: false,
1013
inlineCriticalCss: false,
1114
transferState: true,
1215
replaceRestUrl: true,
16+
// WARNING: changing these settings may impact your Search Engine Optimization (SEO). Any paths listed in "excludedPathPatterns"
17+
// may NOT be indexable by search engine crawlers (like Google Scholar). For search engine crawlers to fully index your site,
18+
// this "excludePathPatterns" should NEVER exclude SSR from the homepage, community/collection pages or item/entity pages.
1319
excludePathPatterns: [
1420
{
1521
pattern: '^/communities/[a-f0-9-]{36}/browse(/.*)?$',

0 commit comments

Comments
 (0)