Open mokurin000 opened 10 months ago
The referrer URL is controlled by the browser, not Ruffle. Ruffle is also subject to CORS restrictions that prevent it from requesting SWF files from unrelated domains, unless those domains send the appropriate Access-Control-Allow-Origin
header. 4399 would need to set up their servers to send this header if they want Ruffle to work; see our wiki.
I found a workaround script for 4399 in an article, which will provide download for their swf file
Sometimes the referer is also checked on downloaded SWF because it downloads other components.
Now you can run most downloaded 4399 swf adding this to the CLI args --referer "https://www.4399.com"
https://github.com/ruffle-rs/ruffle/pull/16424
I attempted to add a referer
header to load 4399 games using the web/package/demo
project, but I discovered that browsers do not permit direct modification of the referer
header. However, browser extensions can modify the referer
header by using the chrome.declarativeNetRequest
API.
Describe the bug
This caused some sites refuses to load the correct swf while the embedded player not working, for example 4399.com
Expected behavior
Ruffle should load target swf with correct referrer
Content Location
https://www.4399.com/flash/161545_1.htm
Affected platform
Browser's extension
Operating system
Windows 11
Browser
Chrome
Additional information
"Error: please start game on our official site"