Chromium 91中Same-site相关标识已移除,本地开发时如何禁用Same-site Cookie验证?
Hey there! I totally get the frustration when those old chrome://flags options vanished in Chromium 91—losing a quick go-to setting like that can throw a wrench in your workflow. Luckily, you can still bypass Same-Site Cookie checks using command-line launch arguments, and it’s just as reliable. Here’s how to set it up across different systems:
Core Command-Line Flag
The key flag you’ll need to replicate the old disable behavior is:
--disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure
This turns off both the SameSite-by-default enforcement and the secure connection requirement for cookies that don’t have a SameSite attribute.
Step-by-Step Setup by OS
Windows
- Right-click your Chromium (or Chrome/Edge/Brave) shortcut and select Properties.
- In the Target field, move to the end of the existing path (leave a space after the closing quote).
- Paste the flag string from above. Your target field should look something like this:
"C:\Program Files\Chromium\Application\chrome.exe" --disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure - Click Apply > OK, then launch Chromium using this shortcut—Same-Site checks will be disabled.
macOS
- Open Finder, go to your Applications folder.
- Right-click the Chromium app and select Show Package Contents.
- Navigate to
Contents > MacOS, then copy the path to theChromiumexecutable. - Open Terminal and run this command (adjust the path if your app is in a different location):
/Applications/Chromium.app/Contents/MacOS/Chromium --disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure - For a permanent shortcut, use Automator to create a custom app that runs this command, or save it as a shell script.
Linux
- Open your terminal.
- Launch Chromium directly with the flag:
chromium-browser --disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure - To make this default for your desktop shortcut:
- Locate the Chromium
.desktopfile (usually in/usr/share/applications/or~/.local/share/applications/). - Open it with a text editor, find the
Exec=line. - Add the flag to the end of the line, like:
Exec=chromium-browser --disable-features=SameSiteByDefaultCookies,CookiesWithoutSameSiteMustBeSecure %U - Save the file—your next Chromium launch will use the flag automatically.
- Locate the Chromium
Quick Heads-Up
- Make sure Chromium is fully closed (including background processes) before launching with the flag—otherwise, the setting might not take effect.
- This method works for all Chromium-based browsers, not just the official Chromium build.
内容的提问来源于stack exchange,提问作者VitalyB




