Laravel, Cloudflare and Trusted Proxies

When using Cloudflare to manage your site, you may notice that if you check the ip address of the request, it will be an ip address from Cloudflare. This is happening because Cloudflare is proxying the request to your server. To get around this issue and get the original request ip, you need to configure trusted proxies in Laravel.

This is important because the throttle middleware checks the request ip and throttles based on ip. If all request look like they are coming from Cloudflare, this will cause issues. Read More

How to View Source Code of an Extension

Browser extensions are composed of Javascript, HTML, CSS, and images. Before installing any extension I will usually review the source code. This is important to verify that an extension is not doing anything malicious. Luckily, viewing the source code is simple if you use the CRX Viewer. (source)

  1. Browse to the extension install page and copy the URL of the extension. (example)
  2. Go to https://robwu.nl/crxviewer/ and paste in the URL. (example)
  3. You can review the code in your browser or download all files and review in your text editor.

Read More

Is Wireless Charging that Great?

With the purchase of my new iPhone, I now had a phone that was capable of wireless charging. Yes yes, I know that Android has had wireless charging for years. I honestly didn’t think it was that great of a feature. How hard is it to just plug in your phone? I decided to get a wireless charger to see how it worked. After some research, I decided to go with the Seneo Wireless Charger. It has good reviews, supports fast charging for the iPhone and is Qi Certified.

Overall I have been happy with the simplicity of just sitting your phone down and it charging. The Seneo charger allows the phone to sit at an angle so you are able to see notifications etc. It also will work with most cases. Just be aware that if you have a large bulky case or a pop socket, you may have trouble getting it to charge.

A wireless charger is a great affordable gift for friends or family. Just make sure their phone supports QI charging. 

Set Image Src from Amazon S3

I needed to request an image from Amazon S3 using ajax so I could read the response metadata headers. At first this seemed like a simple task. The first issue I encountered was that S3 was blocking the metadata headers from the browser using CORS. After a quick update to the S3 cors policy on the bucket, this issue was resolved. But what about turning the blob data type that comes from S3 into an img src. After several Google searches, I was finally able to get it to work. It was more difficult to find than I expected. Read More