Giter Club home page Giter Club logo

cf-n8n-proxy's Introduction

cf-n8n-proxy

Cloudflare worker for n8n proxy

Why do you need this?

  • You can use this service to protect your n8n instance from DDoS attacks.
  • You can use this service to hide your n8n instance from the public.
  • You can use this service to add rate limiting to your n8n instance.
  • You can use this service to add deduplication to your n8n instance.
  • You can use this service to add a queue to your n8n instance.
  • You can use this service to add a retry mechanism to your n8n instance.

Requirements:

  • You need a paid Worker plan ($5 USD) for this service due to the queue.
  • A cloudflare domain

Architecture:

cloudflare -> cloudflare worker -> n8n

How to use?

Wrangler install

npm install -g wrangler pnpm

NPM package install

pnpm install

Wrangler login

wrangler login

Create your wrangler config

cp wrangler.toml_example wrangler.toml
  • Change everywhere example.com to your domain

Create queue

wrangler queues create cf-n8n-proxy-production -e production
wrangler queues create dlq-cf-n8n-proxy-production -e production

Enable deduplication feature

wrangler kv:namespace create cf-n8n-proxy
  • Replace <mykvid> with the response ID in the wrangler.toml file.
  • Change DEDUPLICATION_ENABLED=false to DEDUPLICATION_ENABLED=true in the wrangler.toml file.

IMPORTANT NOTES ABOUT DEDUPLICATION "As of January 2022, expiration targets that are less than 60 seconds into the future are not supported. This is true for both expiration methods."

  • DEDUPLICATION_TTL is optional; by default, it is set to 60 seconds.

Rate limiting

  • Change RATE_LIMITING_ENABLED=false to RATE_LIMITING_ENABLED=true in the wrangler.toml file.

Default 100 requests per minute

simple = { limit = 100, period = 60 }

Deploy your service

wrangler deploy -e production

How to test in local?

wrangler dev

cf-n8n-proxy's People

Contributors

pigri avatar renovate[bot] avatar

Stargazers

Oluwatobi Owolabi avatar  avatar Faisal Iqbal avatar Marcel Darvas avatar Dmitry Moskovenko avatar  avatar Jesus Pacheco avatar  avatar Bram Kn avatar  avatar  avatar

Watchers

Lucian avatar  avatar  avatar  avatar

cf-n8n-proxy's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/codeql.yml
  • actions/checkout v4
  • github/codeql-action v3
  • github/codeql-action v3
  • github/codeql-action v3
npm
package.json
  • cf-workers-hash 1.0.3
  • itty-fetcher 0.9.4
  • itty-router 5.0.17
  • @cloudflare/workers-types 4.20240620.0
  • @types/node 20.14.10
  • eslint-config-prettier 9.1.0
  • eslint-plugin-prettier 5.1.3
  • prettier 3.3.2
  • typescript 5.5.3
  • wrangler 3.65.1
  • node >=18
  • pnpm >=8

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.