Skip to content

Able to change "sqid" variable name in model trait, to avoid data scraping bots #24

Description

@inpromolabs

First of all, I like laravel-sqid, because we can avoid sequential id scraping.

But some bots can detect "sqid" parameter in response (Rest API) and try to brute force it.

In my http logs (SPA) I see some requests with "sqid" parameter, but with randoms (non-existent, I'm sure those not from frontend) values (like, u-[brute force here]), which means that bots are trying to brute force data.

It's unlikely they'll succeed, but they're loading the server with junk requests. It's costs,

AI bots using "sqid" ("u-VariableValue" from response) parameter in requests, trying to brute force response and flooding the server (database requests) with a junk.

Is it possible to customize "sqid" variable name in config or model, to avoid triggering scraping bots doing this?

Something like:
protected $sqidKey = "myName";
or
protected $sqidKey = Str::random(40);

Сhanging the prefix is ​​not enough.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions