storefront.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * Storefront API Key Configuration
  4. *
  5. * Settings for X-STOREFRONT-KEY authentication for shop/storefront APIs
  6. */
  7. return [
  8. /*
  9. |--------------------------------------------------------------------------
  10. | Default Rate Limit
  11. |--------------------------------------------------------------------------
  12. |
  13. | Default number of requests allowed per minute for each storefront key.
  14. | Can be overridden per key in the database.
  15. |
  16. */
  17. 'default_rate_limit' => env('STOREFRONT_DEFAULT_RATE_LIMIT', 100),
  18. /*
  19. |--------------------------------------------------------------------------
  20. | Cache TTL
  21. |--------------------------------------------------------------------------
  22. |
  23. | Time-to-live for cached key validation results in minutes.
  24. | Reduces database queries for repeated requests using the same key.
  25. |
  26. */
  27. 'cache_ttl' => env('STOREFRONT_CACHE_TTL', 60),
  28. /*
  29. |--------------------------------------------------------------------------
  30. | Cache Key Prefix
  31. |--------------------------------------------------------------------------
  32. |
  33. | Prefix used for cache keys to avoid collisions with other cache entries.
  34. |
  35. */
  36. 'key_prefix' => env('STOREFRONT_KEY_PREFIX', 'storefront_key_'),
  37. /*
  38. |--------------------------------------------------------------------------
  39. | Playground API Key
  40. |--------------------------------------------------------------------------
  41. |
  42. | API key used for API documentation and GraphQL playground.
  43. | Generate a dedicated key and set it in your .env file.
  44. |
  45. | Example: STOREFRONT_PLAYGROUND_KEY=pk_storefront_xxx
  46. |
  47. */
  48. 'playground_key' => env('STOREFRONT_PLAYGROUND_KEY'),
  49. ];