This file contains hidden or 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
#!/bin/bash | |
set -ex | |
usage() | |
{ | |
echo "usage: k8s-jprofiler-attach.sh pod_name" | |
} | |
k8s_jvm_pod="${1}" |
This file contains hidden or 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
// extensions/hooks/google-recaptcha-v2/index.js | |
module.exports = function registerHook({ env, exceptions }) { | |
const querystring = require("querystring"); | |
const axios = require("axios"); | |
const { BaseException } = exceptions; | |
const VERIFY_ENDPOINT = "https://www.google.com/recaptcha/api/siteverify"; | |
return { | |
"auth.login.before": async function (input) { | |
const captcha = input["g-recaptcha-response"]; | |
if (captcha) { |