欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Liferay控制台出现redirect to url is not allowed

程序员文章站 2022-07-15 13:24:47
...

在本地部署使用Localhost访问都正常,部署到服务器后用ip访问老是出现warn:redirect to +url+ is not allowed, 原来portal.properties里面有默认的配置如下:

##  
## Redirect  
##  

    #  
    # Set this property to "ip" or "domain" for the redirect security method. If  
    # set to "domain", the portal will only redirect users to domains listed in  
    # the property "redirect.url.domain.allowed". If set to "ip", the portal  
    # will only redirect to domains whose IP address resolve to an IP address  
    # listed in the property "redirect.url.ip.allowed".  
    #  
    #redirect.url.security.mode=domain  
    redirect.url.security.mode=ip  

    #  
    # Input a list of comma delimited domains which the portal is allowed to  
    # redirect to. Input a blank list to allow any domain.  
    #  
    redirect.url.domains.allowed=  

    #  
    # Input a list of comma delimited IPs which the portal is allowed to  
    # redirect to. Input a blank list to allow any IP. SERVER_IP will be  
    # replaced with the IP of the host server.  
    #  
    redirect.url.ips.allowed=127.0.0.1,SERVER_IP  
    redirect.url.ips.allowed=  

按注解的说明,把ips.allowed配置为空或者设置为正确的ip就可以了。

相关标签: liferay