tourze / symfony-fake-server-bundle
返回伪装的Server头信息
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
pkg:composer/tourze/symfony-fake-server-bundle
Requires
- symfony/config: ^7.3
- symfony/console: ^7.3
- symfony/dependency-injection: ^7.3
- symfony/event-dispatcher: ^7.3
- symfony/expression-language: ^7.3
- symfony/framework-bundle: ^7.3
- symfony/http-foundation: ^7.3
- symfony/http-kernel: ^7.3
- symfony/messenger: ^7.3
- symfony/property-access: ^7.3
- symfony/string: ^7.3
- symfony/yaml: ^7.3
- tourze/symfony-dependency-service-loader: 1.0.*
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
- tourze/phpunit-symfony-kernel-test: 1.0.*
- tourze/phpunit-symfony-unit-test: 1.*
This package is auto-updated.
Last update: 2025-11-02 05:17:40 UTC
README
A Symfony bundle that returns fake server headers to deceive scanners and perform invalid scans.
Installation
composer require tourze/symfony-fake-server-bundle
Quick Start
- Add the bundle to your
config/bundles.php:
<?php return [ // ... Tourze\FakeServerBundle\FakeServerBundle::class => ['all' => true], ];
- The bundle will automatically register the event subscriber and start adding fake server headers to responses.
Usage
The bundle automatically adds a fake Server header to HTTP responses that don't already have one. It randomly selects from a predefined list of common server types to help mask the actual server technology.
Available Fake Server Headers
cloudflareWindows-Azure-Web/1.0Microsoft-HTTPAPI/2.0Tenginenginxmarco/3.2JSP3/2.0.14Microsoft-IIS/10.0
Example
When a request is made to your application, the response will include a randomly selected server header:
HTTP/1.1 200 OK
Server: nginx
Content-Type: text/html; charset=UTF-8
...
Configuration
This bundle works out of the box with no configuration required. The fake server headers are automatically applied to all responses.
License
MIT