eidellev / inertiajs-adonisjs

280 stars 17 forks source link

fix: use normalized headers #96

Closed KABBOUCHI closed 1 year ago

KABBOUCHI commented 1 year ago

This PR updates the way we check for the presence of the Inertia header in incoming requests to ensure compatibility with HTTP/2.

HTTP/2 automatically normalizes all headers to lowercase, so we now access the headers property of the request object and look for the lowercase version of HEADERS.INERTIA_HEADER instead of using the rawHeaders property.

eidellev commented 1 year ago

Hi @KABBOUCHI I'm sorry I wasn't clear. I meant you should update the enum itself.