-
Notifications
You must be signed in to change notification settings - Fork 91
SLING-12938: document all OSGi settings related to vanity paths and aliases #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
reschke
wants to merge
1
commit into
master
Choose a base branch
from
SLING-12938
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 | ||||
---|---|---|---|---|---|---|
|
@@ -271,6 +271,15 @@ Aliases are roughly similar to POSIX hard links, restricted to simple names (no | |||||
|
||||||
The following characters are not allowed in `sling:alias` values: `/?#`. Using any of those characters somewhere in the value makes Sling disregard the alias mapping. In addition the aliases `.`, `..` and the empty string are invalid. Invalid aliases are logged with WARN level. | ||||||
|
||||||
### OSGi Settings For Alias Handling | ||||||
|
||||||
| Name (prefixed 'resource_resolver_')| Default | Description | Notes | | ||||||
| ----- | ------- | ------------| ------| | ||||||
| alias_cache_in_background | true | _Alias Cache Init In Background:_ This flag controls whether the alias cache will be initialized synchronously or as a background thread, not blocking the startup. | | ||||||
| allowed_alias_locations | | _Allowed Optimized Alias Locations:_ This setting can contain a list of path prefixes, e.g. /libs/, /content/. If such a list is configured, for alias optimization, only paths from resources starting with this prefix are considered. If the list is empty, all paths are used. | Currently only used for Cache Initialization. | | ||||||
| optimize_alias_resolution | true | _Optimize alias resolution:_ This flag controls whether to optimize the alias resolution by creating an internal cache of aliases. | Obsolete, should not be disabled. | | ||||||
|
||||||
|
||||||
### Impact of Alias Handling | ||||||
|
||||||
In general, the number of aliases have a direct impact on the performance of the resource resolution - as basically all possible permutations of paths for a resource have to be tested against the incoming request path. By default a cache is used to speed up handling aliases during resolving resources. It is highly recommended to have this cache enabled to avoid slowing down request performance. However, the cache might have an impact on startup time and on the alias update time if the number of aliases is huge (over 10000). | ||||||
|
@@ -299,6 +308,20 @@ While an alias can provide a variation for a resource name, a vanity path can pr | |||||
|
||||||
Vanity Paths are similar to symbolic links in POSIX systems. | ||||||
|
||||||
### OSGi Settings For Vanity Path Handling | ||||||
|
||||||
| Name (prefixed 'resource_resolver_') | Default | Description | Notes | | ||||||
| ----- | ------- | ------------| ------| | ||||||
| default_vanity_redirect_status | 302 | _Default Vanity Path Redirect Status:_ The default status code used when a sling:vanityPath is configured to redirect and does not have a specific status code associated with it (via a sling:redirectStatus property). | ||||||
| enable_vanitypath | true | _Enable Vanity Paths:_ This flag controls whether all resources with a sling:vanityPath property are processed and added to the mapping table. | ||||||
| vanitypath_cache_in_background | true | _Vanity Path Cache Init In Background:_This flag controls whether the vanity path cache will be initialized immediately or later as a background task. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| vanitypath_maxEntries | -1 (no limit)| _Maximum number of cached vanity path entries_: The maximum number of cached vanity path entries. | | ||||||
| vanitypath_maxEntries_startup | true | _Limit the maximum number of cached vanity path entries only at startup:_ Controls whether vanitypath_maxEntries only affects vanity path initialization.| | ||||||
| vanitypath_bloomfilter_maxBytes | 1024000 | _Maximum number of vanity bloom filter bytes:_ The maximum number of vanity bloom filter bytes. | Do not touch. | | ||||||
| vanitypath_allowlist | | _Allowed Vanity Path Location:_ This setting can contain a list of path prefixes, e.g. /libs/, /content/. If such a list is configured, only vanity paths from resources starting with this prefix are considered. If the list is empty, all vanity paths are used. | | ||||||
| vanitypath_denylist | | _Denied Vanity Path Location:_ This setting can contain a list of path prefixes, e.g. /misc/. If such a list is configured,vanity paths from resources starting with this prefix are not considered. If the list is empty, all vanity paths are used. | | ||||||
| vanity_precedence | false | _Vanity Path Precedence:_ This flag controls whether vanity paths will have precedence over existing /etc/map mapping when resolving paths to resources. | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you please add the values of the flag into the description? |
||||||
|
||||||
## Interactions between mappings and authentication requirements | ||||||
|
||||||
The [Sling authentication](/documentation/the-sling-engine/authentication.html) mechanism works by registering authentication requirements for paths which are protected. Normally these authentication requirements transparently apply to child resources as well due to the hierarchical nature of the paths used. | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.