inviton-powerduck 0.0.190 → 0.0.191
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/app/powerduck-state.ts
CHANGED
|
@@ -11,6 +11,11 @@ export class UploadImageHelperConfig {
|
|
|
11
11
|
* The base path for uploaded files.
|
|
12
12
|
*/
|
|
13
13
|
static basePath: string = 'files';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Indicates whether to include credentials such as cookies in the upload request.
|
|
17
|
+
*/
|
|
18
|
+
static includeCredentials: boolean = false;
|
|
14
19
|
}
|
|
15
20
|
|
|
16
21
|
export class UploadImageHelper {
|
|
@@ -41,6 +46,7 @@ export class UploadImageHelper {
|
|
|
41
46
|
[AppHttpProvider.authorizationHeaderName]: `Bearer ${AppHttpProvider.bearerToken}`,
|
|
42
47
|
'Accept-Language': PowerduckState.getCurrentLanguage(),
|
|
43
48
|
},
|
|
49
|
+
credentials: UploadImageHelperConfig.includeCredentials ? PowerduckState.getIsDebugMode() ? 'include' : 'same-origin' : 'omit',
|
|
44
50
|
});
|
|
45
51
|
|
|
46
52
|
return (await response.json()) as ImageResponse;
|