The rocket works just fine on factorio.com pages.Access to script at 'https://factorio.com/static/js/factorio.js?v=c6398351' from origin 'https://mods.factorio.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
'Scroll to top' rocket broken on mod portal (CORS)
-
- Long Handed Inserter
- Posts: 69
- Joined: Tue Apr 17, 2018 11:45 pm
- Contact:
'Scroll to top' rocket broken on mod portal (CORS)
The rocket that you click to scroll to the top of the page is broken on mods.factorio.com. It looks to be a CORS error trying to load the script from factorio.com:
Re: 'Scroll to top' rocket broken on mod portal (CORS)
Thanks for the info, I fixed the CORS error.coderpatsy wrote: ↑Sun Nov 13, 2022 3:54 amThe rocket that you click to scroll to the top of the page is broken on mods.factorio.com. It looks to be a CORS error trying to load the script from factorio.com:
bringing the oops to devops
Re: 'Scroll to top' rocket broken on mod portal (CORS)
bump, it's broken in the same way again
Re: 'Scroll to top' rocket broken on mod portal (CORS)
I'm unable to reproduce this issue in Firefox or Chrome. Can you please give me the URL of the page on which the error occurs as well as your browser?
bringing the oops to devops
Re: 'Scroll to top' rocket broken on mod portal (CORS)
The page I'm getting the cors error on is https://mods.factorio.com/ or any other page on the mod portal; my browser is Chromium 117.0.5938.92
I've looked into it a bit, and it indeed is browser-specific, for whatever reason, when sending a GET request to https://factorio.com/static/js/factorio.js?v=53720286 I don't always get an Access-Control-Allow-Origin header in the response:
Access-Control-Allow-Origin header is present when
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
but absent when
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
I've attached a minimal postman repro
overall I'm not sure if this is worth fixing as I'm using chromium (not chrome), which isn't really a popular browser, and newest chrome and firefox don't get the error
- Attachments
-
- factorio.postman_collection.json
- (1.67 KiB) Downloaded 29 times
Re: 'Scroll to top' rocket broken on mod portal (CORS)
The rocket works on brave as well, no issues there.
Pony/Furfag avatar? Opinion discarded.