We have a web server serving static Aurelia files, as well as an API, the server is protected by NTLM (using integrated Windows authentication on OWIN).
When using the Aurelia Fetch Client, we will successfully remove the API without any problems. Here we use the configuration:
constructor(private http: HttpClient){
http.configure(config => {
config
.withBaseUrl('api/')
.useStandardConfiguration();
});
However, when we use the Aurelia Fetch Client , we get 401 (Unauthorized)(it seems the authorization header is missing)
constructor(private client: HttpClient) {
client.configure(cfg => {
cfg
.withBaseUrl('http://localhost:80/api/someEndpoint')
.withDefaults({
headers: {
'Accept' : 'application/json',
'X-Requested-With': 'Fetch'
}
})
Any ideas on how to solve this problem are greatly appreciated.
MaYaN source
share