Previously, when a user with correct permissions uses completion search on a private wiki, the results are returned and cached. Since we are on a private wiki, we don't want to cache results since the content is not accessible to all users. Now, content that is not accessible to all users will not be cached. This patch achieves this by setting the appropriate Cache-Control response headers for the MW REST Search endpoint. Bug: T292763 Change-Id: I693b4088df9c0520d5238c286312ec52ab273604
168 lines
3.3 KiB
JSON
168 lines
3.3 KiB
JSON
[
|
|
{
|
|
"path": "/v1/page/{title}/history",
|
|
"class": "MediaWiki\\Rest\\Handler\\PageHistoryHandler",
|
|
"services": [
|
|
"RevisionStore",
|
|
"NameTableStoreFactory",
|
|
"GroupPermissionsLookup",
|
|
"DBLoadBalancer",
|
|
"PageStore",
|
|
"TitleFormatter"
|
|
]
|
|
},
|
|
{
|
|
"path": "/v1/page/{title}/history/counts/{type}",
|
|
"class": "MediaWiki\\Rest\\Handler\\PageHistoryCountHandler",
|
|
"services": [
|
|
"RevisionStore",
|
|
"NameTableStoreFactory",
|
|
"GroupPermissionsLookup",
|
|
"DBLoadBalancer",
|
|
"MainWANObjectCache",
|
|
"PageStore",
|
|
"ActorMigration"
|
|
]
|
|
},
|
|
{
|
|
"path": "/v1/revision/{from}/compare/{to}",
|
|
"class": "MediaWiki\\Rest\\Handler\\CompareHandler",
|
|
"services": [
|
|
"RevisionLookup",
|
|
"Parser"
|
|
]
|
|
},
|
|
{
|
|
"path": "/v1/revision/{id}/bare",
|
|
"class": "MediaWiki\\Rest\\Handler\\RevisionSourceHandler",
|
|
"services": [
|
|
"MainConfig",
|
|
"RevisionLookup",
|
|
"TitleFormatter",
|
|
"PageStore"
|
|
],
|
|
"format": "bare"
|
|
},
|
|
{
|
|
"path": "/v1/search/page",
|
|
"class": "MediaWiki\\Rest\\Handler\\SearchHandler",
|
|
"services": [
|
|
"MainConfig",
|
|
"SearchEngineFactory",
|
|
"SearchEngineConfig",
|
|
"PermissionManager"
|
|
],
|
|
"mode": "fulltext"
|
|
},
|
|
{
|
|
"path": "/v1/search/title",
|
|
"class": "MediaWiki\\Rest\\Handler\\SearchHandler",
|
|
"services": [
|
|
"MainConfig",
|
|
"SearchEngineFactory",
|
|
"SearchEngineConfig",
|
|
"PermissionManager"
|
|
],
|
|
"mode": "completion"
|
|
},
|
|
{
|
|
"path": "/v1/page/{title}/links/language",
|
|
"class": "MediaWiki\\Rest\\Handler\\LanguageLinksHandler",
|
|
"services": [
|
|
"DBLoadBalancer",
|
|
"LanguageNameUtils",
|
|
"TitleFormatter",
|
|
"TitleParser",
|
|
"PageStore"
|
|
]
|
|
},
|
|
{
|
|
"path": "/v1/page/{title}",
|
|
"class": "MediaWiki\\Rest\\Handler\\PageSourceHandler",
|
|
"services": [
|
|
"MainConfig",
|
|
"RevisionLookup",
|
|
"TitleFormatter",
|
|
"PageStore"
|
|
],
|
|
"format": "source"
|
|
},
|
|
{
|
|
"path": "/v1/page/{title}/bare",
|
|
"class": "MediaWiki\\Rest\\Handler\\PageSourceHandler",
|
|
"services": [
|
|
"MainConfig",
|
|
"RevisionLookup",
|
|
"TitleFormatter",
|
|
"PageStore"
|
|
],
|
|
"format": "bare"
|
|
},
|
|
{
|
|
"path": "/v1/page/{title}/html",
|
|
"class": "MediaWiki\\Rest\\Handler\\PageHTMLHandler",
|
|
"services": [
|
|
"MainConfig",
|
|
"RevisionLookup",
|
|
"TitleFormatter",
|
|
"ParserCacheFactory",
|
|
"GlobalIdGenerator",
|
|
"PageStore"
|
|
],
|
|
"format": "html"
|
|
},
|
|
{
|
|
"path": "/v1/page/{title}/with_html",
|
|
"class": "MediaWiki\\Rest\\Handler\\PageHTMLHandler",
|
|
"services": [
|
|
"MainConfig",
|
|
"RevisionLookup",
|
|
"TitleFormatter",
|
|
"ParserCacheFactory",
|
|
"GlobalIdGenerator",
|
|
"PageStore"
|
|
],
|
|
"format": "with_html"
|
|
},
|
|
{
|
|
"path": "/v1/page/{title}/links/media",
|
|
"class": "MediaWiki\\Rest\\Handler\\MediaLinksHandler",
|
|
"services": [
|
|
"DBLoadBalancer",
|
|
"RepoGroup",
|
|
"PageStore"
|
|
]
|
|
},
|
|
{
|
|
"path": "/v1/file/{title}",
|
|
"class": "MediaWiki\\Rest\\Handler\\MediaFileHandler",
|
|
"services": [
|
|
"RepoGroup",
|
|
"PageStore"
|
|
]
|
|
},
|
|
{
|
|
"method": "PUT",
|
|
"path": "/v1/page/{title}",
|
|
"class": "MediaWiki\\Rest\\Handler\\UpdateHandler",
|
|
"services": [
|
|
"MainConfig",
|
|
"ContentHandlerFactory",
|
|
"TitleParser",
|
|
"TitleFormatter",
|
|
"RevisionStore"
|
|
]
|
|
},
|
|
{
|
|
"method": "POST",
|
|
"path": "/v1/page",
|
|
"class": "MediaWiki\\Rest\\Handler\\CreationHandler",
|
|
"services": [
|
|
"MainConfig",
|
|
"ContentHandlerFactory",
|
|
"TitleParser",
|
|
"TitleFormatter",
|
|
"RevisionStore"
|
|
]
|
|
}
|
|
]
|