未验证 提交 1afcaada 编写于 作者: J Jared Beck 提交者: GitHub

Docs: config.hosts: details re: regexp anchors

上级 a0e0f026
......@@ -263,6 +263,10 @@ Every Rails application comes with a standard set of middleware which it uses in
# `beta1.product.com`.
Rails.application.config.hosts << /.*\.product\.com/
```
The provided regexp will be wrapped with both anchors (`\A` and `\z`) so it
must match the entire hostname. `/product.com/`, for example, once anchored,
would fail to match `www.product.com`.
A special case is supported that allows you to permit all sub-domains:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册