This file contains 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 | |
// src/Twig/AppExtension.php | |
namespace App\Twig; | |
use Twig\Extension\AbstractExtension; | |
use Twig\TwigFunction; | |
class AppExtension extends AbstractExtension |
This file contains 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)) | |
}) | |
/** | |
* When we receive a request, fetch it from our S3 bucket | |
* | |
* For example, a request for: | |
* https://mydomain.com/images/castle01.jpg | |
* will be fetched from: |