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
addEventListener("fetch", (event) => { | |
event.respondWith(handleRequest(event.request)); | |
}); | |
async function handleRequest(request) { | |
const url = new URL(request.url); | |
const fetchAPI = request.url.replace(url.host, 'api.openai.com'); | |
const corsHeaders = { | |
'Access-Control-Allow-Origin': '*', |
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
/* CONFIGURATION STARTS HERE */ | |
/* Step 1: enter your domain name */ | |
const MY_DOMAIN = 'hiskia.app'; | |
/* | |
* Step 2: enter your URL slug to page ID mapping | |
* The key on the left is the slug (without the slash) | |
* The value on the right is the Notion page ID | |
*/ |
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
<?php | |
namespace Services; | |
use Illuminate\Support\Facades\Storage; | |
use Intervention\Image\Facades\Image; | |
use File; | |
class FileService | |
{ |
