Last active
November 16, 2018 14:58
-
-
Save scott2449/717406ddb7ae67e11aa290b2ca8eb532 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = express(); | |
app.use(bodyParser.json()); | |
app.post('/mutate', (req, res) => { | |
console.log(req.body) | |
console.log(req.body.request.object) | |
let adminResp = {response:{ | |
allowed: true, | |
patch: Buffer.from("[{ \"op\": \"add\", \"path\": \"/metadata/labels/foo\", \"value\": \"bar\" }]").toString('base64'), | |
patchType: "JSONPatch", | |
}} | |
console.log(adminResp) | |
res.send(adminResp) | |
}) | |
const server = https.createServer(options, app); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment