简体   繁体   English

Play 2.0中的子域名

[英]Subdomains in Play 2.0

Is it possible work with subdomains in Play 2.0 conf/routes? 是否可以在Play 2.0配置/路由中使用子域? Like Play 1.1: 喜欢Play 1.1:

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

How I can work with subdomains in my Play 2.0 app? 我如何在Play 2.0应用程序中使用子域名?

子域配置不是在Play级别完成,而是在反向代理级别完成。

Unfortunately not. 不幸的是。

Here's the definition of a route: 这是路线的定义:

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

It accepts the verb (eg GET ), the path component (ie not the domain or port, but only the path component) and the handler. 它接受动词(例如GET ),路径组件(即不是域或端口,而只是路径组件)和处理程序。

The definition of PathPattern can be found here , and as far as I can see, it doesn't cater for domain nor port. PathPattern的定义可以在这里找到,据我所知,它不适合域或端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM