Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:Hooks/RequestHasSameOriginSecurity

From mediawiki.org
<Manual:Hooks
RequestHasSameOriginSecurity
Available fromversion 1.27.0
Called to determine if the request is somehow flagged to lack same-origin security.
Define function:
publicstaticfunctiononRequestHasSameOriginSecurity(WebRequest$request){...}
Attach hook:Inextension.json:
{"Hooks":{"RequestHasSameOriginSecurity":"MediaWiki\\Extension\\MyExtension\\Hooks::onRequestHasSameOriginSecurity"}}
Called from:File(s):api/ApiMain.php
Function(s):lacksSameOriginSecurity
Interface:RequestHasSameOriginSecurityHook.php

For more information about attaching hooks, seeManual:Hooks.
For examples of extensions using this hook, seeCategory:RequestHasSameOriginSecurity extensions.


Return false to indicate that the same-origin security is somehow lacked. Note if the "somehow" involves HTTP headers, you'll probably need to make sure the header is varied on.

This hook was added in a security patch and thus not available on Gerrit. It was added inhttps://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/9ec1ef7308acc0366e92f8e6af10ce3cb22b5065%5E%21/.

Details

[edit]
  • $request: The WebRequest object.
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Hooks/RequestHasSameOriginSecurity&oldid=5187624"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp