EDIT
I've managed to get it to work by putting the app files and the Wordpress files in seperate folders. It seems like the .htaccess information is passed through the folder when putting the app files with the .htaccess in the root. It's still unclear though why it did work on some computers in the first place...
I have 2 questions regarding a Access-Control-Allow-Origin error.
Question 1
I'm having a strange issue with an Angular website I'm building in combination with WP REST API.
When I view the website in question with my own laptop I don't get any errors. The same goes for my phone, ipad and the laptop of a friend. Some (most?) people though get a CORS error involving headers not being present (Access-Control-Allow-Origin).
I've tested this with several browsers and with several IP addresses, to exclude any interference from plugins.
So I'm wondering why I don't get these errors on some computers and do get on others.
Question 2
Of course the real question is why some (most?) people get this error.
I'm aware of the fact that you need headers for your resources and to explain what my problem is I think I have to explain my server "setup".
I have a folder on my server with the angular files in it and also the wordpress installation (in it's own folder). I'm requesting .html template files from another folder and other data from the WP REST API. When I'm adding headers via .htaccess with the code below the .html template files will be loaded correctly, but the WP REST API requests will get a multiple values error:
Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
So it seems that WP REST API also adds a header on it's own which causes for the error.
Again, no matter what settings I'm using, a few computers will always display the website correctly.
The website in question is http://www.hostingvs.nl/testsites/zoutendijk/
Hopefully someone can help me with this issue. Thanks in advance!