Giter VIP home page Giter VIP logo

Comments (8)

Dwarfex avatar Dwarfex commented on July 19, 2024

@teolemon - what exactly is the misuse?
I'm afraid simply adding a user agent won't solve any essential misuse - and - would not help in contacting.

Who do you reach out to on a useragent like e.g. "PHP-SDK - Crawler"?

from openfoodfacts-laravel.

Dwarfex avatar Dwarfex commented on July 19, 2024

Would't it be better to create personalized (organizational or independent) API keys?

from openfoodfacts-laravel.

epalmans avatar epalmans commented on July 19, 2024

@teolemon this package is already doing this:

'headers' => ['User-Agent' => $this->parameters['app'] ?? 'Laravel Open Food Facts - https://github.com/openfoodfacts/openfoodfacts-laravel'],

from openfoodfacts-laravel.

teolemon avatar teolemon commented on July 19, 2024

@epalmans

  • Do we concatenate a custom part to the Laravel part ?
  • Is there a warning if no custom part is added ?

@Dwarfex : for now, just personalized headers.

from openfoodfacts-laravel.

epalmans avatar epalmans commented on July 19, 2024
  • Do we concatenate a custom part to the Laravel part ?

No. Currently, the user-agent value is populated with the name of the app the developer is using the package within. On default laravel installation this is "Laravel". As a fallback the value is set instead "Laravel Open Food Facts - https://github.com/openfoodfacts/openfoodfacts-laravel". However in practice, that latter shouldn't ever happen since the APP_NAME environment variabele is - as far as I am aware - always available and set in Laravel app's.

  • Is there a warning if no custom part is added ?

No, but it won't happen anyhow. See previous answer.

from openfoodfacts-laravel.

Dwarfex avatar Dwarfex commented on July 19, 2024

@teolemon

what exactly is the misuse?

from openfoodfacts-laravel.

teolemon avatar teolemon commented on July 19, 2024

It's not Laravel SDK specific, we're getting many search queries (and other) that don't make any sense for human usage, and it would be cool to have an idea of who is using the API.

from openfoodfacts-laravel.

epalmans avatar epalmans commented on July 19, 2024

for the SDK's in general we could maybe introduce some kind of custom headers, like X-OFF-SDK (e.g. having a value of Laravel, Android, Ruby, whatever) along with X-OFF-SDK-VERSION to specify the SDK version no.

from openfoodfacts-laravel.

Related Issues (11)

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.