Do we have AWS SES but for workers? 100k free emails per day sounds cool to me
Do we have AWS SES but for workers? 100k free emails per day sounds cool to me
/blog is hit, it will just return the static asset and not call the worker). Am I missing something? It feels like the final "return" should really be a 404? Which I think technically it would return anyway but to me at least it's a bit misleaading as for assets that exist, it'd never hit the worker anyway
When a request invokes a Worker with assets:
If a request is found with a matching path to the current route requested then that asset will always be served.export default {
async fetch(request, env) {
const url = new URL(request.url);
if (url.pathname.startsWith("/api/")) {
// TODO: Add your custom /api/* logic here.
return new Response("Ok");
}
// Otherwise, serve the static assets.
// Without this, the Worker will error and no assets will be served.
return env.ASSETS.fetch(request);
},
};/blog