'How could I in Symfony 6 set addres like "admin.localhost" as secured using security.yaml area please?

I have security set like thisy in security.yaml in my test project, and I want visitor of project to be logged only if acesses admin.localhost page.

    firewalls: 

    secured_area:
        host: ^admin\.localhost$
        security: true

    secured_area_two:
        pattern: ^/user/list
        security: true

    dev:
        pattern: ^/(_(profiler|wdt)|css|images|js)/
        security: false
        
    main:
        lazy: true
        provider: app_user_provider

        form_login:
            login_path: login
            check_path: login
            enable_csrf: true


Solution 1:[1]

As stated above I used this, which solved the issue:

 - { path: '/', host: admin\.localhost$ }

Thank you all.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 svrl