• 4am@lemm.ee
    link
    fedilink
    English
    arrow-up
    13
    ·
    1 year ago

    Use the Referer header to check what domain the browser is loading from. You can also check the connection origin IP to see if it’s a site you know to be scraping you (i.e. not hotlinking but caching). Could possibly also check the User-Agent header to detect scrapers, depending on if they bother to forge it or not.

    • sugar_in_your_tea
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Yup, it’s pretty easy to detect a cross origin request and serve something different based on that.