Skip to content

Installation

phil/well-known-bundle

Requirements

PackageVersionUsed for
PHP8.5 or later
symfony/http-kernel, symfony/http-foundation^8.2The controller and the answers
symfony/routing^8.2The route loader, the routes of change-password and NodeInfo
symfony/config, symfony/dependency-injection^8.2The configuration, the services, the documents of other bundles
psr/clock^1.0The time of the check of the expiry of the security.txt
phil/monitoring-bundle^0.1, optionalThe check of the expiry of the security.txt

Registering

// config/bundles.php
return [
    // ...
    Phil\WellKnownBundle\PhilWellKnownBundle::class => ['all' => true],
];

Routes

The documents need the bundle's routes. The file imports the route loader, which adds one route per document turned on, and none for the others:

# config/routes/phil_well_known.yaml
phil_well_known:
    resource: '@PhilWellKnownBundle/config/routes.php'

The loader may also be imported by its type:

phil_well_known:
    resource: .
    type: phil_well_known
RoutePathWhen
phil_well_known_security_txt/.well-known/security.txtsecurity_txt
phil_well_known_change_password/.well-known/change-passwordchange_password
phil_well_known_webfinger/.well-known/webfingerwebfinger
phil_well_known_nodeinfo/.well-known/nodeinfonodeinfo
phil_well_known_nodeinfo_documentnodeinfo.path, /nodeinfo/2.1 by defaultnodeinfo
phil_well_known_did_json/.well-known/did.jsondid
phil_well_known_did_configuration_json/.well-known/did-configuration.jsondid_configuration
phil_well_known_atproto_did/.well-known/atproto-didatproto
phil_well_known_apple_app_site_association/.well-known/apple-app-site-associationapple_app_site_association
phil_well_known_assetlinks_json/.well-known/assetlinks.jsonasset_links
phil_well_known_ and the path/.well-known/ and the patheach of documents, and each tagged document

Every route takes GET and HEAD, and is stateless: a listener that opens the session on one of them is reported by Symfony. An address the bundle does not serve stays free for the application's own routes.

A site whose web server answers /.well-known/ itself, for an ACME challenge for instance, lets the other addresses through to Symfony.