Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/kabukky/caddy-redis

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/kabukky/caddy-redis

  • v0.0.0-20190812111957-86ec036dbcad
  • Source
  • Go
  • Socket score

Version published
Created
Source

caddy-redis

This package is a plugin for the Caddy webserver. Its purpose is to store and retrieve user data in and from Redis.

If you HTTP POST a valid JSON payload to /redis/<key>, it will put it into a Redis database under the specified key.

Similarly, if you do a HTTP GET on /redis/<key>, it will return the previously stored data. If you specify a Accept-Encoding header of application/xml, it will return the data as XML, otherwise as JSON.

WARNING: This plugin is for testing purposes only. Do not use in production! Seriously, this plugin will write anything given by anyone to the specified Redis database. You'll want to implement some kind of authentication at the very least.

Sample usage

Storing data

curl -X POST -H "Content-Type: application/json" -d '{"key":"val"}' http://localhost:2015/redis/test

This will SET test => "{"key":"val"}" in Redis (actually, the key will be caddy:test internally to keep things somewhat organized).

Retrieving data

curl -H "Accept-Encoding: application/json" http://localhost:2015/redis/test

This will GET the previously stored data for the key test as JSON.

curl -H "Accept-Encoding: application/xml" http://localhost:2015/redis/test

This will GET the previously stored data for the key test as XML.

Syntax

redis  {
	server localhost:6379 	# NOTE: If not specified, ":6379" is used as the Redis server (default).
	password foobar 		# NOTE: If not specified, Redis is used without authentication (default).
}

FAQs

Package last updated on 12 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc