'Scroll to top' rocket broken on mod portal (CORS)

A place to talk about the official Factorio mod portal (https://mods.factorio.com)
Post Reply
coderpatsy
Long Handed Inserter
Long Handed Inserter
Posts: 68
Joined: Tue Apr 17, 2018 11:45 pm
Contact:

'Scroll to top' rocket broken on mod portal (CORS)

Post by coderpatsy »

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:
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.
The rocket works just fine on factorio.com pages.

User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 174
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

Re: 'Scroll to top' rocket broken on mod portal (CORS)

Post by vinzenz »

coderpatsy wrote:
Sun Nov 13, 2022 3:54 am
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:
Thanks for the info, I fixed the CORS error.
bringing the oops to devops

Equbuxu
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Nov 17, 2023 9:09 pm
Contact:

Re: 'Scroll to top' rocket broken on mod portal (CORS)

Post by Equbuxu »

bump, it's broken in the same way again

User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 174
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

Re: 'Scroll to top' rocket broken on mod portal (CORS)

Post by vinzenz »

Equbuxu wrote:
Sun Mar 24, 2024 3:28 pm
bump, it's broken in the same way again
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

Equbuxu
Manual Inserter
Manual Inserter
Posts: 2
Joined: Fri Nov 17, 2023 9:09 pm
Contact:

Re: 'Scroll to top' rocket broken on mod portal (CORS)

Post by Equbuxu »

vinzenz wrote:
Thu Apr 04, 2024 8:01 am
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?
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 6 times

aka13
Filter Inserter
Filter Inserter
Posts: 684
Joined: Sun Sep 29, 2013 1:18 pm
Contact:

Re: 'Scroll to top' rocket broken on mod portal (CORS)

Post by aka13 »

The rocket works on brave as well, no issues there.
Pony/Furfag avatar? Opinion discarded.

Post Reply

Return to “Mod portal Discussion”