Since last August, I’ve been working on an exciting freelancing project to rebuild and optimize a long-running customer website. The original website had performance issues, with slow loading speeds affecting user experience. My goal was not just to rebuild but to significantly improve the speed and efficiency of the site. Here’s how I approached it.
Implement Basic Authentication Using Cloudflare Workers
When I started working on migrating data from the old website of a project I’m developing for a client to the new website, I felt the need to prevent external users from accessing the site and seeing the migrated data. Only internal users should have access during this phase.
Typically, I implement Basic Authentication through nginx site configurations, which works well. However, I recalled reading that this could also be achieved with Cloudflare Workers—offering a simpler and more flexible solution. In this post, I’ll guide you through implementing Basic Authentication using Cloudflare Workers.
Projects I Worked on in 2024
This past year has been quite active and fun to me as I took part in quite a number of projects for people from different parts of the world. As a matter of fact, I worked with clients from several countries: Norway, Palestine, and the US. Below is a concise outline of the works I did that kept my head spinning.
How to load fonts inside shadow dom
While working on Petmety, I encountered a situation where I needed to load a custom font for text elements inside a Shadow DOM. I chose to encapsulate everything within a Shadow DOM to separate state, CSS, and logic. This task turned out to be somewhat tricky, so I decided to share my solution with you.
How to search for patterns with new line in VSCode
As a developer, you often come across the need to search and remove specific patterns in your code. Recently, I faced a situation where I needed to find and remove a pattern that started with a specific word and ended with another.