Esta es el arreglo más exacta que encomtrarás brindar, pero primero estúdiala pausadamente y analiza si es compatible a tu trabajo.
Ejemplo 1: chrome.exe –disable-web-security
chrome.exe--user-data-dir="C://Chrome dev session"--disable-web-security
Ejemplo 2: ejecutar chrome sin cors
$ open -a Google Chrome--args --disable-web-security --user-data-dir
Ejemplo 3: deshabilitar cors chrome
open -na Google Chrome--args --user-data-dir=/tmp/temporary-chrome-profile-dir --disable-web-security
Ejemplo 4: deshabilitar cors chrome
$ google-chrome --disable-web-security
Ejemplo 5: cors en todas partes
ThisAPI enables cross-origin requests to anywhere.Usage:/Shows help
/iscorsneeded This is the only resource on this host which is served without CORS headers./<url>Create a request to <url>, and includes CORS headers in the response.If the protocol is omitted, it defaults to http(https if port 443 is specified).Cookies are disabled and stripped from requests.Redirects are automatically followed.For debugging purposes, each followed redirect results
in the addition of a X-CORS-Redirect-n header, where n starts at 1.These headers are not
accessible by the XMLHttpRequestAPI.After5 redirects, redirects are not followed any more.The redirect response is sent back
to the browser, which can choose to follow the redirect(handled automatically by the browser).The requested URL is available in the X-Request-URL response header.The final URL, after following all redirects, is available in the X-Final-URL response header.To prevent the use of the proxy for casual browsing, the API requires either the Origin
or the X-Requested-With header to be set.To avoid unnecessary preflight(OPTIONS) requests,
it's recommended to not manually set these headers in your code.Demo: https://robwu.nl/cors-anywhere.htmlSource code : https://github.com/Rob--W/cors-anywhere/Documentation: https://github.com/Rob--W/cors-anywhere/#documentation
Si crees que te ha resultado de provecho nuestro post, sería de mucha ayuda si lo compartes con otros juniors de este modo contrubuyes a extender este contenido.
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)