xiaoyifang / goldendict-ng

The Next Generation GoldenDict
https://xiaoyifang.github.io/goldendict-ng/
Other
1.69k stars 94 forks source link

Online dictionary address domain name + port format relative path resource cannot be loaded #1147

Open Leon406 opened 1 year ago

Leon406 commented 1 year ago

描述 bug

配置在线词典 http://res.leon406.top:886/es6/ ==> 地址改为 https://es6.leon406.top 或者https://html5test.com/, 但页面还是无法正常加载 无法加载相对路径资源, 实际iframe加载相对资源路径是没有端口的

复现 bug 的步骤

随便搜一个词

期望的结果

正常加载网页

相关的截图 image

加载样式丢失

image

nonwill版本可以正常加载 image

系统和软件的版本

Goldendict-ng 23.09.08-WhiteDew.20230907.216505c9 Qt 6.5.2 Visual C++ Compiler 192930151 windows winnt 10.0.22621 x86_64-little_endian-llp64 Flags:USE_XAPIAN MAKE_ZIM_SUPPORT USE_ICONV MAKE_CHINESE_CONVERSION_SUPPORT

github-actions[bot] commented 1 year ago

Bot detected the issue body's language is not English, translate it automatically.

Describe bug

Configure online dictionary http://res.leon406.top:886/es6/ Unable to load relative path resource, The actual iframe loading relative resource path has no port.

Steps to reproduce bug

Search for any word

Desired results

Load web page normally

Relevant screenshots image

System and software versions

Goldendict-ng 23.09.08-WhiteDew.20230907.216505c9 Qt 6.5.2 Visual C++ Compiler 192930151 windows winnt 10.0.22621 x86_64-little_endian-llp64 Flags:USE_XAPIAN MAKE_ZIM_SUPPORT USE_ICONV MAKE_CHINESE_CONVERSION_SUPPORT

xiaoyifang commented 1 year ago

Even port issue is fixed ,the js will be blocked by CORS .

This issue should be deferred for fixes.