BackendSrv: Uses credentials and defaults to same-origin (#27385)

Co-authored-by: Liu Yang yangliuyu@163.com
This commit is contained in:
Hugo Häggmark
2020-09-04 22:11:34 +02:00
committed by GitHub
co-authored by Liu Yang yangliuyu@163.com
parent b6d76cdba7
commit 72c3257d19
3 changed files with 63 additions and 21 deletions
@@ -62,8 +62,12 @@ export type BackendSrvRequest = {
params?: Record<string, any>;
/**
* Indicates whether or not cross-site Access-Control requests should be made using credentials such as cookies, authorization headers or TLS client certificates. Setting withCredentials has no effect on same-site requests.
* In addition, this flag is also used to indicate when cookies are to be ignored in the response.
* The credentials read-only property of the Request interface indicates whether the user agent should send cookies from the other domain in the case of cross-origin requests.
*/
credentials?: RequestCredentials;
/**
* @deprecated withCredentials is deprecated in favor of credentials
*/
withCredentials?: boolean;
};