Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation is not goood #17

Closed
allestaire opened this issue Apr 3, 2023 · 0 comments
Closed

Documentation is not goood #17

allestaire opened this issue Apr 3, 2023 · 0 comments

Comments

@allestaire
Copy link

allestaire commented Apr 3, 2023

Steps needed to make it work (on Lumen only)

  • copy cors.php to config\cors.php
  • Then on bootstrap\app.php enable configuration, add this line $app->configure('cors');
  • (in my case, I was in question why the cors value is empty)
  • Then add this line \Illuminate\Http\Middleware\HandleCors::class to $app->middleware
  • Once that done. If you have custom header such as in my case x-api-key you must add it to allowed_headers array example: ['x-api-key']
  • Then on your api call such as axios you can add it to your custom headers which is base on this documentation Doc
  • Note that the X-Auth-Token should be pass as x-auth-token as I check, the server returns it as small cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant