Skip to content

giuem/never-cors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Never CORS

status license

Unlike CORS Anywhere and crossorigin.me, Never CORS is a proxy server that removes all existed CORS headers.

Why

When I developed TinyCache which loads static resources via XMLHttpRequest (XHR), I need to test XHR requests without CORS headers, but don't want to deploy extra server. So that I tried to find if there are some reliable public static servers I can use. Unfortunately, most of public CDN providers like jsDelivr and unpkg do have CORS headers.

Because of it, I created Never CORS that proxies these CDNs and filters all CORS headers.

Usage

https://never-cors.now.sh/${url}
https://never-cors.now.sh/https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js
$ curl -X GET -sSI "https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js" | grep "access-control"

access-control-allow-origin: *
access-control-expose-headers: *

$ curl -X GET -sSI "https://never-cors.now.sh/https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js" | grep "access-control"
# output nothing

Deployment

This project is based on Now.sh, check here for more information about deployment.

In short,

  1. Download/Clone this project;
  2. Modity now.json: change alias to your own domain or delete it;
  3. Run now command to deploy (Or use Now for GitHub).

License

MIT

About

A proxy server that removes all existed CORS headers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published