Giter Site home page Giter Site logo

Comments (1)

BobbyWibowo avatar BobbyWibowo commented on August 31, 2024

Sorry, unfortunately something like that would require overhauling the session system altogether.

In short, there's really no easy workaround. At best, you can only do some kind of nginx IP-based rate limit on the files' location block. Though that'll only slow scrapers a bit, and can't really handle netbot scrapers with multiple of IP addresses.


For the technical explanation, this fork's session system rely solely on the visitors manually providing an auth token in each of their requests (this is automated by the frontend). As such, there is no "session cookie".

So even if you serve files with Node, to have the ability to programatically check for login status, it just can't. When browsers are fetching your files normally, the auth token won't be shipped in the requests, because it's not a cookie. So even programatically it's not possible to check login status.

On that note, I believe upstream chibisafe, https://github.com/chibisafe/chibisafe, already transitioned to using session cookie. So something like that should be possible with some modifications, if not right out of the box. I haven't checked their codes in a while, but Pitu/Kana, its author, is typically active on their Discord if you want to ask more.

from lolisafe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.