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
-- Problem: sometimes the remote server will return a http:// url and browser gets redirected to a non-https url even though it is accessing https endpoint | |
-- This post-function snippet in Kong helps you overwrite the http part in Location header. | |
if kong.response.get_status() == 302 and kong.response.get_header("location") ~= "^http" then | |
local new_loc = kong.response.get_header("Location"):gsub("http","https") | |
kong.response.set_header("Location",new_loc) | |
end |
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
import com.intellij.database.model.DasTable | |
import com.intellij.database.util.Case | |
import com.intellij.database.util.DasUtil | |
/* | |
* Available context bindings: | |
* SELECTION Iterable<DasObject> | |
* PROJECT project | |
* FILES files helper | |
*/ |
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
import logging | |
from fastapi import FastAPI | |
from starlette.responses import RedirectResponse | |
from starlette.staticfiles import StaticFiles | |
app = FastAPI() | |
@app.get("/") |
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
// String utils | |
// | |
// resources: | |
// -- mout, https://github.com/mout/mout/tree/master/src/string | |
/** | |
* "Safer" String.toLowerCase() | |
*/ | |
function lowerCase(str){ | |
return str.toLowerCase(); |
NewerOlder