-
Notifications
You must be signed in to change notification settings - Fork 824
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
Can't add headers in host and path levels with .php #1301
Comments
+1 |
can you check if this also happens if you use |
I just tested it and can confirm the issue of @xm74 . Changing from |
|
Thanks for your comments! Hope it will be fixed soon. |
Also I found that X-Frame-Options: header was set when H2O processed PHP file. Why and who does this? |
In my test instance the X-Frame-Option header does not exist. I would guess you have configured it elsewhere in h2o.conf (e.g. globally) or it comes from the PHP application and is only passed on by h2o. |
Thanks, @utrenkner. I just found that this headers comes from Roundcube installation wich I used for bug demonstration for "second" sample site. This is not H2O issue. |
I found that header.add (and possible header.set) don't works in path level with .php too. |
Same here. I checked with curl -IL and it mysteriously sends the header via the following 302 redirects: http://domain.ext -> https://domain.ext (headers on 302) -> https://www.domain.ext (no headers on 200) http://www.domain.ext -> https://www.domain.ext (no headers on 200) https://domain.ext -> (headers on 302) -> https://www.domain.ext (no headers on 200) https://www.domain.ext (no headers on 200) I've tested on 2.2.1, 2.2.2 and 2.3.0-DEV. Same results. |
I can confirm @xm74 : I have the typical combination of filedir for static files and redirect to /index.php/ for dynamic content. |
Unfortunately I do not see any progress with this issue so I wrote the simple module addheaders.rb that extracts headers from a H2O format file and adds them to output.
headers.file can contain something like this
In main h2o.conf it calling by standard way in path level:
Hope this hack will be usefull for a while. |
I can confirm that this problem still exists. |
About year passed from initial post but problem still here without any movement. |
Any chances for patch in 2.3 ? |
See a strange H2O 2.2.2 behavior under FreeBSD. If site using PHP file as index than there is no possibility to add headers at host level. In other case when site usin index.html all works fine. PHP processing goes via file.custom-handler
Here is two sites. First don't using PHP index, and second does.
Answers:
The text was updated successfully, but these errors were encountered: