
Security News
Socket Releases Free Certified Patches for Nuxt Security Vulnerabilities
Socket releases free Certified Patches for high-severity Nuxt vulnerabilities, including server-side remote code execution through server island props.
express-phpify
Advanced tools
Express, (literally) Redefined.
NOW WITH OPTIONS
Install this package to run following command.
npm install express-phpify // or else you can use `yarn add express-phpify`.
And just add below code to your app (if you don't need to configure something).
// `app` is your existing express application.
phpify(app);
OR use the options to match your needs! (v.1.1.0 or higher)
// `app` is your existing express application.
phpify(app, {
// (Optional) What should it set the header value X-Powered-By to? default: PHP/5.3.3, set false to disable
headerXPoweredBy: 'PHP/5.3.3',
// (Optional) What should it set the header value server to? default: Apache/2.2.27 (Unix), set false to disable
headerServer: 'Apache/2.2.27 (Unix)',
// Should it fake PHPSESSID? This is default, set false to disable
// Legacy Codes will be compatible at this point, but i recommend using this way.
fakePHPSESSID: {
// maxAge of fake session Cookie in milliseconds, (default: 5 minutes)
maxAge: 300000,
// Instead of PHPSESSID, Which fake session name you are going to use? (default: PHPSESSID)
sessionName: "PHPSESSID",
// Where should be the basePath of the cookie? (default: /)
basePath: "/"
},
// Redirection setup. This is the default, set false to disable
redirection: {
// add .php at end of the file, e.g. /a -> /a.php, default: true
file: true,
// should we redirect directory? set false to disable
directory: {
// (Optional) set the indexFileName e.g. /a/ -> /a/index.php
indexFileName: 'index.php'
}
},
// Mock the eastereggs at PHP. (available from 1.2.3-beta)
// This will read the version info of PHP from headerXPoweredBy (if not set, 5.3.3 will be used.)
// This will not work if your headerXPoweredBy's version is setted over 5.5.0 (since PHP removed it) (Default: true)
phpEastereggs: true
})
Before you run actual application's codes, Please run phpify(app); (Suppose app as express application) beforehand.
phpifying can not procede, if you use phpify after the application logic. (responses are already sent)
This library will only allow accessing to paths that end with / or with .php extension by default,
If you don't want it, Set the option redirection to false (default: true)
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
FAQs
Express, (literally) Redefined.
The npm package express-phpify receives a total of 33 weekly downloads. As such, express-phpify popularity was classified as not popular.
We found that express-phpify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket releases free Certified Patches for high-severity Nuxt vulnerabilities, including server-side remote code execution through server island props.

Security News
An open letter signed by 50 companies, from NVIDIA and Microsoft to Mistral and Hugging Face, urges Washington not to restrict open weight AI.

Security News
/Research
A fake corepack.org site is impersonating the Node.js tool and delivers an infostealer and proxyware to developers who download it.