fecshop_local.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. // 本文件在app/web/index.php 处引入。
  3. // fecshop的核心模块
  4. $modules = [];
  5. foreach (glob(__DIR__.'/fecshop_local_modules/*.php') as $filename) {
  6. $modules = array_merge($modules, require($filename));
  7. }
  8. // services
  9. $services = [];
  10. foreach (glob(__DIR__.'/fecshop_local_services/*.php') as $filename) {
  11. $services = array_merge($services, require($filename));
  12. }
  13. // 组件
  14. $components = [];
  15. return [
  16. 'modules' => $modules,
  17. 'services' => $services,
  18. 'components' => $components,
  19. 'params' => [
  20. 'rateLimit' => [
  21. 'enable'=> false, // 是否开启?默认不开启速度控制。
  22. 'limit' => [120, 60], // 速度控制[120,60] 代表 60秒内最大访问120次,
  23. ],
  24. /**
  25. * 该配置用来设置:允许那些账户在appapi入口进行登录获取token
  26. * 1.apiUserAllow数组的值为空:代表默认是所有的后台用户
  27. * 2.apiUserAllow数组中设置了用户名(数组可以设置多个),那么,只有包含在这个数组中的用户,才可以用于appapi用户登录获取access-token。其他的账户获取token就会失败
  28. * 3.默认该数组为空,允许所有的appadmin的后台用户进行登录获取access-token
  29. */
  30. 'apiUserAllow' => [
  31. // 'admin','terry'
  32. ],
  33. ],
  34. ];