Files
sm-sitemap-plugin/config/config.yaml
Jakub Zych cf5c40e442 fix(17): WR-05 throttle /sitemap.xml and cache its output
The anonymous route resolved every registry item on each request with no
throttle and no cache.

- surf bucket sitemap-xml: 60 requests a minute per client IP.
- The generated XML is cached for golem15.sitemap.cache_seconds (default
  60, 0 off), keyed by root URL, definition and settings so a save shows
  at once; one generation runs at a time.
2026-10-12 21:38:39 +02:00

45 lines
1.8 KiB
YAML

# golem15.sitemap defaults, read as golem15.sitemap.<key>.
#
# cache_seconds is how long a generated /sitemap.xml is served from memory.
# A save of the definition or the settings shows at once; registry content
# (a new or changed post) shows once the entry expires. 0 turns the cache
# off.
cache_seconds: 60
#
# The priority tier rules assign a URL the value of one of the five
# priority settings when Enable priority tiers is on. A URL's path, without
# trailing slashes ("" for the homepage), is matched against the rules in
# order and the first match wins; a URL no rule matches keeps its item's
# priority. Each rule names a setting (priority_homepage, priority_services,
# priority_blog, priority_categories or priority_legal) and either exact
# (a list of paths) or pattern (a regular expression in RE2 syntax, checked
# at boot).
#
# The defaults below are the rules the WinterCMS plugin had in code
# (getPriorityForUrl), so a site configured the same way produces the same
# priorities. A host replaces the whole list in its own config, for example
# in config/golem15.yaml under the same key below sitemap:.
priority_tiers:
- setting: priority_homepage
exact: ["", "/en"]
- setting: priority_services
pattern: '^/(uslugi|en/services|realizacje|en/work)/[^/]+$'
- setting: priority_blog
pattern: '^/(blog|en/blog)/[^/]+/[^/]+$'
- setting: priority_categories
pattern: '^/(uslugi|en/services|realizacje|en/work|blog|en/blog)(/[^/]+)?$'
- setting: priority_legal
exact:
- /polityka-prywatnosci
- /en/privacy-policy
- /regulamin
- /en/terms
- /o-nas
- /en/about
- /kontakt
- /en/contact
- /laboratorium-ai
- /en/ai-lab
- /laboratorium-ai/zabawa-animacja
- /en/ai-lab/blob-playground