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
(cors) { | |
@cors_preflight method OPTIONS | |
header { | |
Access-Control-Allow-Origin "{header.origin}" | |
Vary Origin | |
Access-Control-Expose-Headers "Authorization" | |
Access-Control-Allow-Credentials "true" | |
} |
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
(async () => { | |
const fetchCloudFlare = async () => { | |
return fetch('https://www.cloudflare.com/cdn-cgi/trace') | |
.then(response => response.text()) | |
.then(data => { | |
return data | |
.trim() | |
.split("\n") | |
.reduce(function(obj, pair) { | |
pair = pair.split("="); |
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
(async () => { | |
const fetchCloudFlare = async () => { | |
return fetch('https://www.cloudflare.com/cdn-cgi/trace') | |
.then(response => response.text()) | |
.then(data => { | |
const $data = {}; | |
(data || "").trim().split("\n").map((el) => { | |
if (el.includes('ip=')) { | |
$data.ip = el.replace('ip=', ''); | |
} |
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
#!/bin/bash | |
sudo curl -SL https://github.com/docker/compose/releases/latest/download/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose |