5 ms·
Probably shouldn't be "hard" coding the scheme (http). Check $_SERVER['https']. You can make sure this fastcgi param exists with a simple directive in nginx (fa
by nodesocket 13y ago
Probably shouldn't be "hard" coding the scheme (http). Check $_SERVER['https']. You can make sure this fastcgi param exists with a simple directive in nginx (fastcgi_params):
fastcgi_param HTTPS $https if_not_empty;
Also, the 404 route, should be able to be defined as a custom function:
Macaw::fourofour(function() {
header($_SERVER["SERVER_PROTOCOL"] . " 404 Not Found");
header("Status: 404 Not Found");
});
- NoahBuscher 13y agoErrors are now functions!
- X4 13y agofourofour is not as semantic as notFound, or not_found xD .. idk. this mixes up routing and api building, right? What people currently use most to build their api (mostly afterwards) is: http://docs.guzzlephp.org/en/latest/ http://docs.guzzlephp.org/en/latest/ btw. here's a nice and new php framework I've just recently found: http://www.cygniteframework.com/2013/07/quickstart.html http://www.cygniteframework.com/2013/07/quickstart.html