Handle Panic in HTTP Server by Using Middleware in Go

If you have code in Go, most likely you have ever encountered a panic. Panic can stop your application if it is not recovered. Fortunately, in the Go HTTP server, there is already a panic recovery, so the server will continue to run if panic is encountered. But the client will not get any response from the server if a panic happens. It is good that you have your own panic recovery that responds with an error message.

[Read More]

Enable WordPress HTTPS With AWS CloudFront

Why do you need to enable HTTPS for your WordPress site?

HTTPS secures your data transmitted in the network by encrypting it so that the intruder can’t see and tamper the data. It is important to protect your web with HTTPS, whether your web is big e-commerce or just a simple blog. This article will show you how to enable HTTPS for your WordPress site using Amazon CloudFront.

[Read More]

Reduce Backend Load Using Cache-Control

It is common practice to separate front end and back end service for a website. One of the reasons for this is so that we can scale back end or front end separately. Most of the time, we need more resources to serve back end than the front end. To reduce loads that coming to backend we need some caching. Fortunately, there is a Cache-Control header. The back end can control how the front end should cache the resource by using this header. Cache-control is commonly used for image files or static files such as javascript. It also can be used to ajax JSON request or any other request. This article will show you how to use the Cache-Control header to reduce load to back end for your website.

[Read More]