injector: Fix CORS bypass breaking when the header is already served
The description tab was accidentally deleted in merge commit b7e5982a47db4db63443ac4b74c8f7b737d17cdd.
If migrating from discordapp.com to discord.com fails, the client will fallback to discordapp.com. We only checked discord.com in requests, so the scripts would never be blocked in injector. This means node-preload never gets kicked off, so web-preload is missing, but also DiscordNative is never loaded.
This manifests in many things, but the notable ones are Moonbase missing, voice being broken, and the window frame not working. User xylyra in the moonlight Discord server reported this to us, and after a very long debugging session (thank you for your cooperation!), we stumbled upon the old domain in the logs.
The easiest no-code fix for this would be telling users to manually create the domainMigrated file, which signals to discord_desktop_core that migration finished. This would wipe their localStorage, though, breaking all persisted stores and their logins in the process.
This is mostly untested (it's hard to test such a niche case), but it should work fine. moonlight still loads fine on discord.com.
This issue doesn't happen in browser, since the browser URL will always be discord.com. This also updates the blocks in the core extensions to be safer.
Update mappings and move most findByCodes to paths