Socket
Socket
Sign inDemoInstall

netlify-purge-cloudflare-on-deploy

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.2 to 1.0.3

10

index.js
const fetch = require('node-fetch');
const {
env: { CLOUDFLARE_API_KEY, CLOUDFLARE_ZONE_ID, CLOUDFLARE_EMAIL },
} = require('process');
module.exports = {

@@ -11,6 +15,6 @@ async onEnd({

console.log('Preparing to trigger Cloudflare cache purge');
let baseUrl = `https://api.cloudflare.com/client/v4/zones/${inputs.zoneId}/purge_cache`;
let baseUrl = `https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/purge_cache`;
let headers = {
'X-Auth-Email': inputs.cloudflareEmail,
'X-Auth-Key': inputs.cloudflareApiKey,
'X-Auth-Email': CLOUDFLARE_EMAIL,
'X-Auth-Key': CLOUDFLARE_API_KEY,
'Content-Type': 'application/json',

@@ -17,0 +21,0 @@ };

{
"name": "netlify-purge-cloudflare-on-deploy",
"version": "1.0.2",
"version": "1.0.3",
"description": "Automatically purge Cloudflare cache on Netlify deploy.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -11,2 +11,7 @@ # netlify-purge-cloudflare-on-deploy

In Netlify, go to Seetings -> Build & Deploy -> Environment -> Environment variables and set up:
* CLOUDFLARE_EMAIL
* CLOUDFLARE_ZONE_ID
* CLOUDFLARE_API_KEY
## netlify.toml template

@@ -16,5 +21,1 @@

package = "./plugins/netlify-purge-cloudflare-on-deploy"
[plugins.inputs]
cloudflareEmail = "cloudflare@email.com"
cloudflareApiKey = "yourApiKey"
zoneId = "yourZoneId"

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc