【问题标题】:Heroku maintenance URL does not redirectHeroku 维护 URL 不重定向
【发布时间】:2012-12-09 15:23:57
【问题描述】:

出于测试目的,我在 heroku 中添加了 url http://google.com 作为维护 URL。当我打开维护模式并尝试访问我的页面时,我得到了一个丑陋的响应,而不是被重定向到谷歌。其他人有这个问题还是我没有得到什么?

顺便说一句:重定向到错误 URL 工作正常。

这是我得到的回应:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head>
      <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
      <style type="text/css">
        html, body, iframe { margin: 0; padding: 0; height: 100%; }
        iframe { display: block; width: 100%; border: none; }
      </style>
    <title>Offline for Maintenance</title></head>
    </head>
    <body>
      <iframe src="http://google.com">
        <p>Application Error</p>
      </iframe>
    </body>
    </html>

【问题讨论】:

    标签: heroku


    【解决方案1】:

    根据 Heroku 支持,这是预期的行为。他们不执行重定向,而只是将页面作为 iframe 包含到他们自己的 HTML 文件中。

    太糟糕了,如果您在 Heroku 上托管一个以 JSON 左右返回响应的 API,那效果就不太好了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-09-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-07
      • 2016-01-12
      • 1970-01-01
      相关资源
      最近更新 更多