halo-sigs / plugin-umami

Halo 2.0 对 Umami 的集成。
https://halo.run/store/apps/app-KfOps
GNU General Public License v3.0
9 stars 7 forks source link

关于写好umami,设置里头的配置项之后,出现了访问不了的情况 #10

Open kwxmxb opened 1 year ago

kwxmxb commented 1 year ago

那个ID是填对的,站点地址就是域名,不加http或者https,那个共享链接也是对的,他就是那个工具旁边访问那个umami 会访问不了,会出现这个报错提示 net::ERR_BLOCKED_BY_RESPONSE 由于web服务不允许 iframe 引用,需要在 web服务中设置 X-Frame-Options HttpServletResponse response.setHeader (“x- frame -options”, “DENY”); 设置有3种参数 请问有什么解决办法?,

nexus181 commented 1 year ago

请问一下怎么查看站点ID啊?

ruibaby commented 1 year ago

https://github.com/halo-sigs/plugin-umami#faq

yulongsa commented 5 months ago

server{ listen 443 ssl http2; server_name [umami.domain.com];

...

add_header Access-Control-Allow-Origin 'https://halo.domain.com';
add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
if ($request_method = 'OPTIONS') {
    return 204;
}

add_header Content-Security-Policy 'frame-ancestors halo.domain.com';
location / {
    #...
    proxy_hide_header 'Access-Control-Allow-Origin';
    proxy_hide_header 'Content-Security-Policy';
}

} 添加在哪里呢,宝塔的反代配置提示错误

kwxmxb commented 5 months ago

server{ listen 443 ssl http2; server_name [umami.domain.com]; #... add_header Access-Control-Allow-Origin 'https://halo.domain.com'; add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; if ($request_method = 'OPTIONS') { return 204; }

add_header Content-Security-Policy 'frame-ancestors halo.domain.com';
location / {
    #...
    proxy_hide_header 'Access-Control-Allow-Origin';
    proxy_hide_header 'Content-Security-Policy';
}

} 添加在哪里呢,宝塔的反代配置提示错误

这个好像不是反向代理那里填的,可能在配置文件那里 反向代理那里填容器的端口

103203dbxk7bbb3ohizexh

kwxmxb commented 5 months ago

请问一下怎么查看站点ID啊?

站点 ID:可在 Umami 的设置 -> 网站 -> 编辑中找到