
This extension provides control over XMLHttpRequest and fetch methods by providing custom “access-control-allow-origin” and “access-control-allow-methods” headers to every requests that the browser receives. A user can toggle the extension on and off from the toolbar button. To modify how these headers are altered, use the right-click context menu items. You can customize what method are allowed. The default option is to allow ‘GET’, ‘PUT’, ‘POST’, ‘DELETE’, ‘HEAD’, ‘OPTIONS’, ‘PATCH’ methods. You can also ask the extension not to overwrite these headers when the server already fills them. This extension also fixes CORS policies of redirected URLs.
Default values:
Access-Control-Allow-Origin: request initiator or ‘*’
Access-Control-Allow-Methods: ‘GET, PUT, POST, DELETE, HEAD, OPTIONS, PATCH, PROPFIND, PROPPATCH, MKCOL, COPY, MOVE, LOCK’
Access-Control-Allow-Methods: request initiator or ‘*’
Access-Control-Allow-Credentials: ‘true’
Access-Control-Expose-Headers: request initiator or ‘*’
To report bugs please use: https://github.com/balvin-perrie/Access-Control-Allow-Origin—Unblock
Change Log:
0.1.7:
1. Supports WEBDAV methods
Show perfeito
Breaks drive.google.com for me if enabled for all sites.
Works very well and very well thought, by default it’s disabled for security reasons but it can be enabled on a site-by-site basis by just clicking the icon, perfect for local javascript development! Also worth mentioning the plugin is opensource and also available on Firefox and Microsoft Edge in addition to Google Chrome. Kudos to the developers for such an easy and well working plugin!
Brabo
Add whitelist site, sites where extension will dont work
Didn’t work. Simple as that.
This does not work for local html & local file.
Sample html is below:
—
var url = “file:///Users/amagaiwork/Desktop/sample.pdf”;
var pages = [], heights = [], width = 0, height = 0, currentPage = 1;
var scale = 1.5;
function draw() {
var canvas = document.createElement(‘canvas’), ctx = canvas.getContext(‘2d’);
canvas.width = width;
canvas.height = height;
for(var i = 0; i < pages.length; i++)
ctx.putImageData(pages[i], 0, heights[i]);
document.body.appendChild(canvas);
}
pdfjsLib.disableWorker = true; // due to CORS
const loadingTask = pdfjsLib.getDocument(url);
loadingTask.promise.then(function (pdf) {
getPage();
function getPage() {
pdf.getPage(currentPage).then(function(page) {
console.log("Printing " + currentPage);
var viewport = page.getViewport(scale);
var canvas = document.createElement('canvas') , ctx = canvas.getContext('2d');
var renderContext = { canvasContext: ctx, viewport: viewport };
canvas.height = viewport.height;
canvas.width = viewport.width;
page.render(renderContext).then(function() {
pages.push(ctx.getImageData(0, 0, canvas.width, canvas.height));
heights.push(height);
height += canvas.height;
if (width < canvas.width) width = canvas.width;
if (currentPage < pdf.numPages) {
currentPage++;
getPage();
}
else {
draw();
}
});
});
}
});
Works great!
It’s working quite well
Gets the job done.
A feature request would be HEAD requests, but I’m not sure if that’s possible.
It works. Thanks!
Nice Extension, works well.
cool
Works for me!
Me ha funcionado perfecto.
Does the job done.
Simple Enough
OK!! it work with cors, but your extension broke another site 😐
Not in this case “The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode is ‘include’. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute” in this case (and, in fact it will work better everywhere), header should be origin of request.
not working on my side
As of today (28 July 2020), CORS Unblock seems to be breaking Youtube video playback. But it’s easy enough to keep it disabled most of the time and enable it quickly if I’m doing a bit of AJAX testing.
Не работает, пишет Uncaught DOMException: Blocked a frame with origin “https://ionmc.top” from accessing a cross-origin frame.
Amazing, it solved the problem perfectly
Me encanto
It just works! Period