Welcome Guest, Not a member yet? Register   Sign In
How do I get HTTP headers in 4.0.4?
#1

(This post was last modified: 02-14-2023, 03:03 PM by ailerux.)

I need to grab the authentication headers from the raw HTTP request. 
I tried $this->request->header() but I get a 500 error:
Call to undefined method CodeIgniter\\HTTP\\IncomingRequest::header()

$this->request->getHeader('Content-Type') returns empty (via Postman)

Also, where is the 4.0.4 User Guide?
Reply
#2

(This post was last modified: 02-14-2023, 10:26 PM by kenjis.)

Do not use 4.0.4. It is no longer supported and has vulnerabilities.
See https://github.com/codeigniter4/CodeIgni...advisories
Please upgrade to the latest 4.3.1 as soon as possible.
Or at least to 4.2.11 that does not have known vulnerabilities.

>  If you want to see previous versions, you can download from the codeigniter4/userguide repository.
https://codeigniter4.github.io/CodeIgnit...stallation
Reply
#3

It's an existing project I took over and need to fix a few things before i can upgrade to 4.3.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB