An open API service indexing awesome lists of open source software.

https://github.com/tonychouteau/no-cors-bridge

Server to pass through cors with Axios server side (XMLHttpRequest)
https://github.com/tonychouteau/no-cors-bridge

axios cors-bridge expressjs javascript nodejs

Last synced: about 2 months ago
JSON representation

Server to pass through cors with Axios server side (XMLHttpRequest)

Awesome Lists containing this project

README

        

# **no-cors-bridge**
A NodeJS server to pass through CORS with Axios server side (XMLHttpRequest)

# **Already online**

## **How to use it**

Make a request on : http://vps.tonychouteau.fr/bridge/

Exemple : http://vps.tonychouteau.fr/bridge/https://jsonplaceholder.typicode.com/todos/1

Only GET works for now.

## **Use**

### **Before**

```javascript
fetch("https://api.namefake.com/french-france/random")
.then(res => res.json())
.then(data => {
console.log(data);
});
```

![Cross-Origin Error](https://raw.githubusercontent.com/TonyChouteau/no-cors-bridge/master/NotOK.png)

### **Now**

```javascript
fetch("http://vps.tonychouteau.fr/bridge/https://api.namefake.com/french-france/random")
.then(res => res.json())
.then(data => {
console.log(data);
});
```

![It works !](https://raw.githubusercontent.com/TonyChouteau/no-cors-bridge/master/OK.png)