Add header explanation for Laravel Nova
I've been searching why my Laravel Nova wasn't working. Some extra explanation for the docs should help others out
In the file you modified, we already have a list of "other headers": https://github.com/brefphp/bref/blob/master/docs/frameworks/laravel.md?plain=1#L181-L182
Shouldn't we add the X-Inertia in the same list?
@afu-dev I’ve added it as optional. Not everyone uses Nova or Inertia. There is a limit of 9 (if I’m right) on the forwarded headers.
Likewise, not everyone uses Livewire. I propose to have all optional headers in the same place instead of one in the forwardedHeaders list and one underneath the source code.
Indeed, the forwardedHeaders list is limited (to 10 headers, ref: https://github.com/getlift/lift/blob/master/docs/server-side-website.md?plain=1#L365), and adding everything to it will break the code. Maybe a note like you did with "if you use this, add this header, if you use that, add that header"?
(Again, just a proposition to be extra clear with everyone reading the doc 😉)
I agree on it @afu-dev, I’ll update it later today and change livewire too. Also I’ll add a notice about the limit of 10 forwardedHeaders
Thanks for the PR, and good points here!
How about adding it to the list, but commented (with a comment above saying "uncomment if you use Nova"). We could even do the same thing for the Livewire header (commented by default), that way we avoid hitting the limit of 10 headers too easily?
@mnapoli ill see what’s the best to keep it clear and brief and update my PR
@mnapoli little bit late, kinda busy. Updated as requested
Thank you both for contributing!