I ran into an issue which is little strange. The files were migrated on the server long back and were never changed since a month and everything was working fine.
Basically I had this in PHP(I was using laravel framework 5.2) since a month :
header("Access-Control-Allow-Methods : GET, POST, PUT, DELETE");
The website was working fine and suddenly today it stopped working. I had this error in apache error.log : Header Access-Control-Allow-Methods contains invalid characters.
When I removed the space after colon and made like below it worked immediately :
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE");
My concern is :
- Can this space cause such issue?
- What could be the reason it was working fine before and same code started throwing error today.
- I am using AWS EC2 instance and I checked, there were no server/service updates performed, nor any other files were changed.
- My zend opcache module is disabled, so I am curious if it was cached, what was it for?
Any help would be much appreciated.