K
K
kazhuravlev2015-03-15 18:50:45
Java
kazhuravlev, 2015-03-15 18:50:45

How to match a domain name in the play framework?

The task is to match not only urlpath but also subdomains or domains.
How can I specify a host pattern using conf/routes?
If this is not possible in routes, how can a custom router be described?

GET {client}.example.com/ @controllers.Application.index

I saw a link to 1.1 releasenotes . Does not work. Apart from this page, I couldn't find any mention of routeHost in the docs.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem, 2015-03-22
@mrRontgen

No way. Write a method like
And on the web server, configure the transfer of the third-level domain in the queryString.
Or try request.host match {....}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question