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

$_SERVER analog not full #354

Open
Tuezov52 opened this issue Jan 26, 2024 · 1 comment
Open

$_SERVER analog not full #354

Tuezov52 opened this issue Jan 26, 2024 · 1 comment

Comments

@Tuezov52
Copy link

I need to get the request data schema(http or https) and host(site.ru or www.site.ru ). php has $_SERVER['REQUEST_SCHEME'] and $_SERVER['HTTP_HOST']. I've tried, how do I get them?
PS "At the moment, I only see $request->server['request_uri'] and $request->server['query_string']"

@bitslip6
Copy link

The variables you are looking for are in $request->header and are NOT prefixed with 'HTTP_' so:

$request->header['host'] = $_SERVER['HTTP_HOST'], etc..

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

2 participants