Home > Web Front-end > JS Tutorial > How to Disable the Same-Origin Policy in Chrome?

How to Disable the Same-Origin Policy in Chrome?

DDD
Release: 2024-12-31 08:00:16
Original
507 people have browsed it

How to Disable the Same-Origin Policy in Chrome?

Disabling Same-Origin Policy in Chrome

Question:
How can the same-origin policy be disabled in Chrome?

Answer:
To disable the same-origin policy in Chrome, follow these steps:

  1. Close Chrome: Quit all instances of the browser.
  2. Restart with Argument: Launch Chrome using the following command:

    chromium-browser --disable-web-security --user-data-dir=[some directory here]
    Copy after login
  3. Ignore Warning: Upon opening, Chrome will display a warning about using an unsupported command. Ignore this message.
  4. Disable Policy: The same-origin policy is now disabled.

Note:

  • All Chrome instances must be closed before running the command.
  • This method was tested with Chromium 5 on Ubuntu and allows access to the contents of an iframe with the source "http://google.com" from a localhost-served page.
  • In Chrome versions prior to 48, the command was simply "chromium-browser --disable-web-security".

The above is the detailed content of How to Disable the Same-Origin Policy in Chrome?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template