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
11 changes: 8 additions & 3 deletions config/config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ ui:
ssl: false
host: localhost
port: 4000
# Specify the public URL that this user interface responds to. This corresponds to the "dspace.ui.url" property in your backend's local.cfg.
# 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).
# Specify the public baseURL that this user interface responds to. This corresponds to the "dspace.ui.url" property in your backend's local.cfg.
# [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).
# If the baseUrl is invalid/incorrrect, then search engine crawlers (like Google Scholar) will not be able to index your site.
# The baseUrl is required by Angular to protect against SSRF attacks like those described in CVE-2026-27739.
baseUrl: http://localhost:4000
# NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript
nameSpace: /
Expand All @@ -30,8 +32,11 @@ ssr:
# disabled (false) by default to boost server performance at the expense of loading smoothness.
inlineCriticalCss: false
# Patterns to be run as regexes against the path of the page to check if SSR is allowed.
# If the path match any of the regexes it will be served directly in CSR.
# If the path match any of the regexes it will be served directly in CSR (i.e. SSR will be disabled for this path).
# By default, excludes community and collection browse, global browse, global search, community list, statistics and various administrative tools.
# [WARNING] changing these settings may impact your Search Engine Optimization (SEO). Any paths listed in "excludedPathPatterns"
# may NOT be indexable by search engine crawlers (like Google Scholar). For search engine crawlers to fully index your site,
# this "excludePathPatterns" should NEVER exclude SSR from the homepage, community/collection pages or item/entity pages.
excludePathPatterns:
- pattern: "^/communities/[a-f0-9-]{36}/browse(/.*)?$"
flag: "i"
Expand Down
6 changes: 6 additions & 0 deletions src/environments/environment.production.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@ export const environment: Partial<BuildConfig> = {

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