Не могу получить rss сервиса через сервис:
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { rssAPI } from '../../app.constants';
@Injectable()
export class RSSService {
constructor(
private http: HttpClient,
) {}
public getRSS(): Observable<any> {
return this.http.get('https://www.presseportal.de/rss/bau-immobilien.rss2');
}
}
Получаю такую ошибку:
Failed to load
https://www.presseportal.de/rss/bau-immobilien.rss2: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '
localhost:4200' is therefore not allowed access.