Ionic5 HttpErrorResponse

Viewed 111

after nights of trying to solve my solutions im writing to you. My Problem is, that im trying to Fetch the Wordpress Rest Api for my Page News. With "ionic serve --lab" it works but if i try to read the news on my device i get the Error in xcode:

"[error] - ERROR Error: Uncaught (in promise): HttpErrorResponse: {"headers":{"normalizedNames":{},"lazyUpdate":null,"headers":{}},"status":0,"statusText":"Unknown Error","url":"https://hgw-hofweier.de/wp-json/wp/v2/posts?page=1","ok":false,"name":"HttpErrorResponse","message":"Http failure response for https://hgw-hofweier.de/wp-json/wp/v2/posts?page=1: 0 Unknown Error","error":{"isTrusted":true}}

I tried many other solutions by adding lines in Index.html and config.xml but nothing realy helped. My webserver is running Nginx. I also tried to add lines to the nginx.conf like its said on enable-cors.org but that did not helped ether.

I hope you can help me...

Thanks Yeti

0 Answers
Related