Hot linking my cascading style sheets

Someone told me that another person is linking to my CSS file. I managed to find them using my CSS file. I am not ok with them linking my CSS file.

Is it possible to allow only one url to use my css file?

I asked the person to stop and told them: β€œYou can take it and hold it in another place,” but it seems they will not listen. I decided to change my background to something borderline nsfw, but that still didn't stop them from repeating it again. I could start putting a goat, etc., but it will waste my time.

+6
source share
4 answers
+6
source

You can wrap css in php code and check the referrer.

0
source

You can lock access folders or files using the server settings - http://support.microsoft.com/kb/324066 - but if you are in a hosted environment, you may not be able to change these settings - you may need to make a request to your host.

0
source

If your site (or supports) PHP, you can put your CSS in a PHP file and include it in the files it needs. Then it would be safe from hot plugging.

-1
source

Source: https://habr.com/ru/post/891908/


All Articles