issue 23628 admin site api#33973
Conversation
|
This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
|
This PR was closed because it has been stalled with no activity. |
|
Claude finished @wezell's task in 1m 48s —— View job Rollback Safety Analysis — Complete
Result: Label Summary of findings:
No database migrations (DDL changes, runonce tasks), Elasticsearch mapping changes, or data model version bumps were found — all changes are pure Java/filter/config additions. |
| * Default list of "admin" paths. These can be added to or removed by setting the ADMIN_SITE_REQUEST_URIS (to add) | ||
| * and/or ADMIN_SITE_REQUEST_URIS_EXCLUDE to remove. These are automatically wildcarded at the end, .e.g. /html/* | ||
| */ | ||
| String[] _ADMIN_SITE_REQUEST_URIS_DEFAULT = { |
| * @return | ||
| */ | ||
| default boolean allowBackendLoginsOnNonAdminSites() { | ||
| return Config.getBooleanProperty(ADMIN_SITE_ALLOW_BACKEND_LOGINS, false); |
There was a problem hiding this comment.
if this is called frequently Lazy would be better
| * @return | ||
| */ | ||
| private ConcurrentHashMap<String, Object> getConfig() { | ||
| ConcurrentHashMap<String, Object> config = (ConcurrentHashMap<String, Object>) CacheLocator.getSystemCache() |
There was a problem hiding this comment.
I think in caffeine you can do something such as
ConcurrentHashMap config = cache.get(_ADMIN_SITE_CACHE_KEY, k -> new ConcurrentHashMap<>());
It is the Caffeine approach for thread safe computeifAbsent
|
Pull Request Unsafe to Rollback!!!
|
❌ Bedrock Review failed —
|
❌ Bedrock Review failed —
|
❌ Bedrock Review failed —
|
ref: #23628
This PR creates the idea of a canonical
ADMIN_SITE_URLwhich is the URL that the customer MUST use to manage their sites site. IfADMIN_SITE_URLconfig variable is set then any admin URLs, e.g./dotAdminwill not be available on any other domain that points to the environment. It will also automatically set thex-robots-tag: noindex, nofollowon the admin site to prevent the admin domain getting indexed as well.The
ADMIN_SITE_URLcan only be set as a ENV or system config variable.Lots of config switches:
ADMIN_SITE_ENABLED: boolean. This functionality is disabled by default and can be enabled by setting this variable to trueADMIN_SITE_URL: String. the main canonical url for all admin requests - this is protocol :// domain (:optional port), e.g.https://admin.dotcms.comorhttps://my.supersite.com:8443.ADMIN_SITE_REQUESTS_FORCE_SECURE: boolean. defaults to false, can be set to force https (or 8082) for all admin requestsADMIN_SITE_REQUEST_HEADERS: comma separate list. response headers to add to request to admin sites. Defaults tox-robots-tag: noindex, nofollowADMIN_SITE_REQUEST_DOMAINS: comma separate list. These domains will automatically be considered as "admin only" domains. These values are automatically added to this list:ADMIN_SITE_REQUEST_DOMAINS_EXCLUDE: comma separate list. remove these domains from the list of admin domainsADMIN_SITE_REQUEST_URIS: comma separate list. uris that should be considered as "admin only" uris. These values are already added to this list:ADMIN_SITE_REQUEST_URIS_EXCLUDE: comma separate list. Remove these URIS as admin URIs