Timothy Klim
Timothy Klim

Reputation: 1267

Subdomains in Play 2.0

Is it possible work with subdomains in Play 2.0 conf/routes? Like Play 1.1:

GET    {client}.mysoftware.com/         Application.index

How I can work with subdomains in my Play 2.0 app?

Upvotes: 4

Views: 720

Answers (2)

Julien Richard-Foy
Julien Richard-Foy

Reputation: 9663

The subdomain configuration is not done at the Play level, but at the reverse proxy level.

Upvotes: 8

opyate
opyate

Reputation: 5428

Unfortunately not.

Here's the definition of a route:

case class Route(verb: HttpVerb, path: PathPattern, call: HandlerCall) extends Positional

It accepts the verb (e.g. GET), the path component (i.e. not the domain or port, but only the path component) and the handler.

The definition of PathPattern can be found here, and as far as I can see, it doesn't cater for domain nor port.

Upvotes: 1

Related Questions