-
Notifications
You must be signed in to change notification settings - Fork 342
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
getallheaders #190
Comments
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/138331759 The labels on this github issue will be updated when the story is started. |
From the docs...
The |
That was unclear if the buildpack could be configured with mod_php - as I see there are different things (cfi, fm, pear, etc). |
It would be challenging to use mod_php. The binaries that we produce don't build mod_php, so that would be the first step to making this work. From there, you need to reconfigure HTTPD to use the module and not php-fpm, and you'd need to change the start command which will start the php-fpm processes. All in all, it would require a lot of changes to the build pack, possibly even a fork. Not something I would recommend unless it's absolutely necessary to get your app running. |
what is the solution to get the header data ?? |
Ex: |
@dmikusa-pivotal i need to get Authorization from the response . |
You should be able to get any header via https://stackoverflow.com/questions/541430/how-do-i-read-any-request-header-in-php#541450 |
i tried but not getting the token nodejs response if you can guide by seeing this i want "authorization": "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6ImtleS1p` |
Sorry, I knew this sounded familiar but had to refresh my memory a bit. Most headers you can get using the method above. You should be able to allow it by adding this setting: https://httpd.apache.org/docs/2.4/en/mod/core.html#cgipassauth If you add a Other options are to have HTTPD handle this for you. Currently, Basic & digest auth can be done by dropping settings into a |
I believe that we provide this module as well. In theory, it would allow you to create a FastCGI authorizer which can make authorization decisions. I haven't done this though, so it might take more work and customizations to make it actually work. If you go this route and do get it working, feel free to share what you find. Perhaps we could do something to make support of this scenario easier. |
@sclevine - We might want to consider doing this out-of-the-box. The main reason I've heard it is disabled by default is to prevent accidental disclosure of a username/password to the script that's running, but in our use case the HTTPD server is specifically set up to service the scripts, thus it's a fair assumption that the scripts are trusted. I don't think it would have any other implications. |
@dmikusa-pivotal You are the Man. Thanks you so much. now i am facing one more issue is that when i am trying to use CF Sync Plugin i am getting the Application "cfphpapp" is not running on Diego any help is appreciated |
All apps deployed to Cloud Foundry for probably the last three years have been on Diego. You'd be on a dangerously old version of CF if you're still using DEAs. I'm not sure where you are pushing your app, but if it's a public provider you're definitely on Diego. If your target is an on-premise CF deployment, you might want to check with your operator to see if they're still using DEAs. Aside from that, check with the cf sync plugin author cause it's possible there is a bug in that plugin. |
What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running
cf curl /v2/info && cf version
?PCF 1.9 & PCF 1.7
What version of the buildpack you are using?
PHP bp 4.3.18
If you were attempting to accomplish a task, what was it you were attempting to do?
use of PHP native function getallheaders()
What did you expect to happen?
http://php.net/manual/en/function.getallheaders.php
What was the actual behavior?
code is
Please confirm where necessary:
The text was updated successfully, but these errors were encountered: