Comments (6)
Hi Olivier,
I think this is a great idea. I'd like to keep the spirit of Webdis by not loading a file from disk though, so it will probably have to go through Redis. What do you think of this, in the config file?
"default_root": "/GET/index.html"
That gives you control over the key and the file type. If you want your root to be an XML file or a text file, that's up to you.
I can add this in a few hours if you don't have any more comments.
from webdis.
This solution is ok for me only if i can force this key to be readonly for security reason.
My first idea was to include the file in the config file and to read the content of this file only at startup.
from webdis.
Webdis doesn't have any concept of keys, any sequence of commands is sent as-is to Redis. You'll have to disable the SET
command, and probably some others in order to have a safe service.
You're probably better off disabling all the commands for everyone and enabling only the ones you need. I'll add a second, “read-only” config file to the repository to show you how to do it.
from webdis.
I need to let the SET command enabled. Finaly, i do not need that the key to be readonly because i can use an unguessable key.
For example :
"default_root": "/GET/rilfdjfsdufffyfijiifrfefef.html"
I will disable some command like KEYS for example.
So your solution is OK for me if you do not respond to the "/" URL by a rediction to "/GET/rilfdjfsdufffyfijiifrfefef.html".
from webdis.
I've just pushed some code to support this feature; it doesn't redirect the client but does a transparent substitution instead.
from webdis.
Tested and it works like a charm.
Many many thanks for having added this.
from webdis.
Related Issues (20)
- make: /bin/sh: Operation not permitted when running the Dockerfile HOT 2
- Access-Control-Allow-Origin not being sent in OPTIONS response HOT 2
- OPTIONS response has invalid blank header with no value HOT 2
- Fallen at first hurdle - NOAUTH HOT 5
- Multiple users in ACL ? HOT 4
- Redis Cluster Support HOT 2
- Query on Multiple http requests on single client - webdis connection HOT 2
- DELETE method
- Support for redis-stack expected
- Support for redis-stack expected?
- Support for Redis Stack expected? HOT 8
- HTTP/2 Support for Webdis HOT 1
- Recovery using .rdb file in docker container HOT 4
- Direct redis access, redis-cli and pub/sub build HOT 4
- transaction support HOT 1
- Trouble connecting docker image to external redis server HOT 9
- Docker image becomes unresponsive after some time. HOT 9
- XREAD not receiving messages via websocket
- TLS issue when Using webdis with AWS MemoryDB
- Inconsistent behavior between GET / POST HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webdis.