[ADF-3938] support for XMLHttpRequest.withCredentials flag (#4190)

* support XMLHttpRequest.withCredentials

* proper defaults and json schema updates

* remove outdated docs

* remove empty declaration from app config

* fix blob support
This commit is contained in:
Denys Vuika
2019-01-25 12:12:06 +00:00
committed by Eugenio Romano
parent 08c9b6d117
commit 5887fa1052
6 changed files with 69 additions and 32 deletions

View File

@@ -66,22 +66,6 @@ Example of the default settings file content:
Note that the settings in the example above are the default ones supplied with the server.
You can override the values in your custom `app.config.json` file if necessary.
You can change the path or name of the configuration file when importing the [`CoreModule`](../../lib/core/core.module.ts) in your main application.
```ts
...
@NgModule({
imports: [
...
CoreModule.forRoot({
appConfigFile: 'app.production.config.json'
})
],
...
}
export class AppModule { }
```
Below is a simple example of using the [`AppConfigService`](../core/app-config.service.md) in practice.
**[app.component](../../demo-shell/src/app/app.component.ts).ts**
@@ -156,3 +140,16 @@ of a property when the app config is loaded:
console.log(logLevelValue); //this will be 'trace';
});
```
## XMLHttpRequest.withCredentials
In the configuration file, you can enable [XMLHttpRequest.withCredentials](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials)
for @alfresco/js-api calls and PDF Viewer.
```json
{
"auth": {
"withCredentials": true
}
}
```