A simple method to prevent hotlinking of LNMP images

Yesterday in the QQ group, I saw a friend asking how to prevent hotlinking in the environment of LNMP. Regarding this question, Brother Jun has actually answered it in the forum. I will borrow it to share it here, and it will also be considered as a forum. notes.

StarryDNS: 7 USD KVM/1GB/20GB/500GB/Hong Kong/Japan/Singapore

StarryDNS is a foreign hosting merchant established in 2012. Its Chinese name is Starry Internet. It provides VPS hosting and independent server rental products. Its data centers include Hong Kong, Japan, South Korea, and Singapore. , Los Angeles in the United States and the Netherlands, etc.