【已解决】求助,solo 后台管理有两个请求返回 403

本贴最后更新于 2533 天前,其中的信息可能已经东海扬尘

ubuntu 16.04 openjdk 8 h2 数据库

56491df5c6fa4024a2e84b8b928f1fa9-1111.png

e442a98396a242ad9a79efff9961a5cc-2222.png

nginx 配置
upstream blog {
server localhost:8080; # Tomcat 监听端口
}

server {
listen 80;
listen [::]:80;

    server_name liweiwei.org;

    location / {
            proxy_pass http://blog$request_uri;
    proxy_set_header  Host $host:$server_port;
    proxy_set_header  X-Real-IP  $remote_addr;
    client_max_body_size  10m;
    }

}

latke.properties 配置

Server

Browser visit protocol

serverScheme=http

Browser visit domain name

serverHost=liweiwei.org

Browser visit port, 80 as usual, THIS IS NOT SERVER LISTEN PORT!

serverPort=80

Runtime Mode

#runtimeMode=DEVELOPMENT
runtimeMode=PRODUCTION

相关帖子

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...
  • 如果你的 servePath 配置的不是 IP,然后你用 IP 是无法登录的。

    XMLHttpRequest cannot load http://localhost:8080/login. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8080' is therefore not allowed access. The response had HTTP status code 404.

  • 其他回帖
  • mxf

    nginx 做了 http 重定向到 https, 有些资源跨域请求不到,如何解决

    1 回复
  • 修改 latke.props 具体请参考 https://hacpai.com/article/1474087427032

  • liweiwei
    作者

    用这两种方式清理是没用的

    3165238a548749e5af756259531730a6-55.png

    1539b4c8f2f34fa497298a4d44e15157-66.png

  • 查看全部回帖