tafelrunde
tafelrunde

Reputation: 128

URLs with domain name in symfony

I'm pretty new to working with Symfony and I cannot find a way around my problem:

I have a domain, say testing.domain.tld where I deploy my app for testing purposes. Routing works as expected for all my self written controllers, but when i send an email or in easyadmin, the generated URL is something like 127.0.0.1:8080/route instead of testing.domain.tld/route.

This can probably be done in config, but I do not see where/how...

I would be very thankful for any hints!

Upvotes: 0

Views: 2497

Answers (1)

Alessandro Chitolina
Alessandro Chitolina

Reputation: 906

You have to configure the router request context base url. If you are using at least Symfony 5.1 you can configure it via the framework.router.default_uri configuration key, otherwise you have to specify the host, scheme and base path of your application.

Read more about this feature in this post from symfony blog

Upvotes: 1

Related Questions