ciao!

devo interrogare una API non scritta da me.
da PHP mi ci collego tranquillamente, mentre da Angular no.

ho implementato un HttpInterceptor, che ho modificato per eseguire richieste a questa API (oltre che alla mia):
codice:
import {Injectable} from '@angular/core';
import {
    HttpRequest,
    HttpHandler,
    HttpEvent,
    HttpInterceptor,
    HttpResponse,
    HttpErrorResponse,
} from '@angular/common/http';
import {Observable, of} from 'rxjs';
import {AuthService} from '../_services/auth.service';
import {MessageService} from 'primeng/api';
import {map, catchError} from 'rxjs/operators';

@Injectable()
export class RequestInterceptor implements HttpInterceptor {

    constructor(
        private authService: AuthService,
        private msgService: MessageService
    ) {
    }

    intercept(request: HttpRequest<any>, next: HttpHandler): Observable<any> {

        if (request.url.includes('URL_API_NON_MIA')) {
            request = request.clone({
                setHeaders: {
                    Authorization: 'Basic ' + btoa(this.authService.getWebnetClient() + ':' + this.authService.getWebnetSecret()),
                    Accept: 'application/json',
                    'Access-Control-Allow-Origin': '*',
                    'Access-Control-Allow-Methods': '*',
                    'Access-Control-Allow-Headers': 'Origin, Content-Type, X-Auth-Token, content-type'
                },
            });
            // console.log(request);
            return next.handle(request);
        }

        if (this.authService.isLoggedIn() && !request.url.includes('URL_API_NON_MIA')) {
            request = request.clone({
                setHeaders: {
                    Authorization: `Bearer ${this.authService.getToken()}`,
                    Accept: 'application/json',
                },
            });
            return next.handle(request);
        }

        return next.handle(request).pipe(
            map((event: HttpEvent<any>) => {
                if (event instanceof HttpResponse) {
                    const {res, message} = event.body;
                    if (res && res === 'ko') {
                        throw new HttpErrorResponse({
                            status: 401,
                            statusText: 'Non Autorizzato',
                            error: {message},
                        });
                    }
                }
                return event;
            }),
            catchError((error: HttpErrorResponse) => {
                this.msgService.add({
                    key: 'tst',
                    severity: 'error',
                    summary: `${error.status} - ${error.statusText}`,
                    detail: error.error.message,
                });
                return of(error);
            })
        );
    }
}
come vedete faccio un controllo se la richiesta contiene l'ip dell'altro server (URL_API_NON_MIA).
ed ho aggiunto i vari headers (sempre che li abbia aggiunti correttamente).
questo quello che ottengo in console:
codice:
XHR OPTIONS http://URL_API_NON_MIA/WNServicesRest/loyalty/getCard?cards=0401995000011
CORS Missing Allow Origin

Bloccata richiesta multiorigine (cross-origin): il criterio di corrispondenza dell’origine non consente la 
lettura della risorsa remota da http://URL_API_NON_MIA/WNServicesRest/loyalty/getCard?cards=0401995000011.
Motivo: header CORS “Access-Control-Allow-Origin” mancante. Codice di stato: 401.

Bloccata richiesta multiorigine (cross-origin): il criterio di corrispondenza dell’origine non consente 
la lettura della risorsa remota da http://URL_API_NON_MIA/WNServicesRest/loyalty/getCard?cards=0401995000011.
Motivo: richiesta CORS non riuscita. Codice di stato: (null).
il programmatore di questa API da la "colpa" ad Angular, anche se io so che questi settaggi vanno fatto lato API (o cmq io li ho sempre fatti lato API, ma magari mi sono perso qualcosa).

qualche suggerimento in merito??