This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const mergeArgs = (savedArgs, args, i = 0) => | |
| savedArgs.map((e) => { | |
| if (e === curry.placeholder && i < args.length) { | |
| return args[i++]; | |
| } | |
| return e; | |
| }); | |
| const curry = | |
| ( |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "openapi": "3.0.1", | |
| "info": { | |
| "title": "Deel REST API", | |
| "contact": { | |
| "name": "Deel API Team", | |
| "email": "apiteam@deel.com" | |
| }, | |
| "termsOfService": "https://www.letsdeel.com/terms-of-service", | |
| "version": "1.15.7" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // The URL for the remote third party API you want to fetch from | |
| // but does not implement CORS | |
| const API_URL = 'https://api.example.com/api/'; | |
| export const onRequest = async (context) => { | |
| const url = context.request.url.replace(/https?:\/\/.+?\/api\//gi, API_URL); | |
| // Rewrite request to point to API URL. This also makes the request mutable | |
| // so you can add the correct Origin header to make the API server think | |
| // that this request is not cross-site. |