Cloudflare Origin Customizer, allowing to map Cloudflare CDN to Origin paths
This Cloudflare App attempts to replicate AWS CloudFront's convenient capability of mapping path of incoming requests to a different origin path.
Can be used as a standalone worker, see workers/worker.js
for details.
Adds DNS record used as your Cloudflare-backed CDN.
Adds Cloudflare Worker, which maps all incoming requests matching your Cloudflare CDN hostname to configured Origin path.
WARNING: When using S3 as Origin, make sure to have S3 URLs publicly reachable, or have appropriate bucket policy. See S3_as_Origin.md for example policy.
- Fork and clone the repo.
- Make desired changes.
- Install the dependencies with
yarn install
then build the project withyarn build
(ornpm run build
). - Next, navigate to Cloudflare App Creator and upload your project directory.
The App Creator will update automatically on file changes (Chrome only). Once you're done testing, press Create App to submit your app for moderation. Refer to our Terms of Use for more information.
yarn start
(ornpm start
) Sets up your dev environment and runs Webpack in watch mode.yarn build
(ornpm run build
) Lints your project and compiles your JavaScript and CSS once for release.
dev:setup
Add other initialization scripts to your development pipeline here.
The project uses yarn-run-all which makes it easy to run tasks in series or parallel using yarn
or npm
.
This is where all the installer options are added for the app.
DNS field is used to to configure Cloudflare DNS Records. If you don't want to configure DNS, just delete this field.
This is where the magic happens. Your app starts here.
Write your app styles here.
This file is used to add a Cloudflare Worker to the app. Each app may contain one worker. If you don't want to use workers, just delete this file along with the workers configuration in install.json
.
Contains icons, tile images, and screenshots used in your Cloudflare Apps page.
Download media-templates.sketch
Simple Webpack 4 config using Babel and CSS Loader. Please refrain from modifying the config to minify your built code.
The Cloudflare developer documentation for examples and API usage.