We recently had a small problem with our content delivery system. The setup is as follows: – AWS S3 bucket that requires authentication – EC2 instance, running Nginx with ngx_aws_auth – ELB load balancer in front of the EC2 instance – CDN configured to use the ELB as the origin The problem was that the… Continue reading Nginx as origin for S3 with authentication, with CDN on top
Category: IT
Nginx: Reject request if header is not present
It was surprisingly difficult to find a full working example of this, so here’s my take on “How to make Nginx require that a certain header is present with a certain value in the incoming request”: nginx.conf: http { map $http_x_mycustomheader $is_mycustomheader_not_ok { default “1”; MyApprovedValue “0”; } … } mysite.conf: server { … location… Continue reading Nginx: Reject request if header is not present
WordPress 4.0 not vulnerable
Related to my previous post, I emailed WordPress lead developers about the vulnerability, and got this response from Andrew Nacin: We’re aware of the report and have been investigating. If you are running the latest version of WordPress (4.0), you have nothing to worry about. EDIT 2014-11-21: WordPress 4.0.1 is out, with several security fixes… Continue reading WordPress 4.0 not vulnerable
Comments disabled due to WordPress vulnerability
UPDATE 2014-11-10: WP 4.0 is not vulnerable. The commenting feature on this blog has been temporarily disabled (using the Disable Comments-plugin) due to an apparently discovered vulnerability in all current versions of WordPress. The details of the vulnerability have not been published yet, but WordPress will publish fixed versions in the next few days. I’m… Continue reading Comments disabled due to WordPress vulnerability
OS X 10.10 Yosemite phones home
After OS X 10.10 Yosemite came out, a lot of people noticed the OS sending private information to Apple’s servers without the user’s consent. I haven’t updated to Yosemite yet, and I might not update at all, largely because of such disturbing findings. Apple has released a statement saying “we take privacy seriously”, but sending… Continue reading OS X 10.10 Yosemite phones home
Whiskygate
This has been discussed online at length, so I won’t go into details. In short, Finland’s State Regional Administration Agency (Avi) told the organizers of the “Beer and Whisky Expo” that if Google searches for “whisky” return links to their event, they’d lose their liquor licence and the event would have to be cancelled. According… Continue reading Whiskygate
Launching Newsbeuter from the Dock
There are plenty of RSS readers out there, but I just found one that fits my minimalistic CLI needs like a glove: Newsbeuter. It’s available for OS X via Homebrew (as well as multiple flavours of Linux). Installing Newsbeuter wasn’t quite as straightforward as it could’ve been, especially since I wanted to be able to… Continue reading Launching Newsbeuter from the Dock
Creating Drupal 7 nodes with PHP via the restws API
Drupal 8 has a built-in REST API that allows programmatical access to all the entities on a site. Similar functionality has been implemented for Drupal 7, in the RESTful Web Services (restws) module. In project I’m working on, in preparation for upgrading a site to Drupal 8, we were looking into options for creating “D8… Continue reading Creating Drupal 7 nodes with PHP via the restws API
Pythagoras calculator update
A commenter suggested that I add a visualization of the triangle being calculated to my Pythagoran theorem calculator. Adding that was just a few more lines of code using the canvas-element, so here’s the updated version (direct link to the tool):
Heatmap generation library using PHP and GD
While working on further development of my Helsinki public transport departures heatmap, I quickly noticed that heatmap.js, as good a library as it is, just can’t quite do all the things I needed it to do as fast as I’d like to get them done. I decided to move some of the functionality on the… Continue reading Heatmap generation library using PHP and GD