Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于内网搭建的问题 #11

Closed
Ruanxingzhi opened this issue Oct 4, 2016 · 4 comments
Closed

关于内网搭建的问题 #11

Ruanxingzhi opened this issue Oct 4, 2016 · 4 comments

Comments

@Ruanxingzhi
Copy link

Ruanxingzhi commented Oct 4, 2016

uoj搭建在192.168.6.20,把80端口映射到8765
FILE .config.php:

'web' =>
  array (
    'main' =>
    array (
      'protocol' => 'http',
      'host' => '192.168.6.20:8765',
    ),
    'blog' =>
    array (
      'protocol' => 'http',
      'host' => 'blog.192.168.6.20:8765',
    ),
  ),

然后出现“页面已过期”:

233

在外网的时候不会出现这个问题。
应该如何解决……?

@vfleaking
Copy link
Owner

这不是bug。。。这是 undefined behavior。。。我没有设计改端口的代码。。。因为线上的 uoj 并不需要这个功能……

如果你有兴趣可以加一下……

你这个错误出现的可能原因是:php 想把 cookie 存在 hostname 下,但是 hostname 带了个奥妙重重的端口所以被拒了

@Ruanxingzhi
Copy link
Author

@vfleaking 搞成了80端口……

然后翻车啦……
翻车啦

@vfleaking
Copy link
Owner

噢。。我知道是什么问题了。。
看 app/models/Session.php 的第 7 行。。。把那个前置的点去掉

本来这个点加到域名上的意思是这个域名及其子域名都可以看见这个 cookie 的。。碰到 ip 就。。翻车了。。惨啊。。

晚上我来 push 一发加到 config 里。。。

@Ruanxingzhi
Copy link
Author

成功,谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants