Posts tagged with today I learned

Today I Learned: PHP getallheaders() method and NGINX

PHP has a useful getallheaders() method that returns a request’s HTTP headers as an array. I was using this for my organization’s CMS to check the origin of a request so I could enable CORS for whitelisted origins. It worked... Read more

Today I Learned: Rendering View and Layout in Rails

It’s possible to specify both the view and the layout when calling the render method in a Rails controller. Most examples of using the render method (at least that I’ve seen) only show how to specify the view, defaulting to... Read more