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
| sub vcl_recv { | |
| //Use req.proto instead of req.http.X-Forwarded-Proto if your varnish server isn't behind a load balancer | |
| if ( req.http.X-Forwarded-Proto !~ "(?i)https") { | |
| //The 750 number is arbitrary, you just need a unique number to check for in the vcl_synth sub | |
| return (synth(750, "")); | |
| } | |
| } | |
| sub vcl_synth { | |
| if (resp.status == 750) { |
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
| sub vcl_recv { | |
| if (req.url ~ "/images") { | |
| set req.http.section-origin = "myimages"; | |
| #If the url on the other server is different you may need to modify the req.url property | |
| set req.http.host = "myimages.hostname.com"; | |
| } | |
| } |
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
| { | |
| "proxychain": [ | |
| { | |
| "name": "varnish", | |
| "image": "varnish" | |
| } | |
| ], | |
| "environments": { | |
| "Production": { | |
| "hostname": "www.mysite.com", |
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
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: keepalive-test | |
| --- | |
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| namespace: keepalive-test | |
| name: origin1 |
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
| ns1_record.endpointgroup - *terraform.NodeApplyableResource | |
| provider.ns1 - *terraform.NodeApplyableProvider | |
| 2018/09/10 09:41:22 [DEBUG] resource ns1_record.endpointgroup using provider provider.ns1 | |
| 2018-09-10T09:41:22.890Z [DEBUG] plugin: starting plugin: path=/app/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.0.0_x4 args=[/app/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.0.0_x4] | |
| 2018-09-10T09:41:22.891Z [DEBUG] plugin: waiting for RPC address: path=/app/.terraform/plugins/linux_amd64/terraform-provider-ns1_v1.0.0_x4 | |
| 2018-09-10T09:41:22.899Z [DEBUG] plugin.terraform-provider-ns1_v1.0.0_x4: 2018/09/10 09:41:22 [DEBUG] plugin: plugin address: unix /tmp/plugin029243236 | |
| 2018-09-10T09:41:22.902Z [DEBUG] plugin.terraform-provider-ns1_v1.0.0_x4: 2018/09/10 09:41:22 [INFO] NS1 Client configured for Endpoint: https://api.nsone.net/v1/ | |
| ns1_record.endpointgroup: Creating... | |
| answers.#: "" => "2" |
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
| static_resources: | |
| listeners: | |
| - name: main | |
| address: | |
| socket_address: | |
| address: 0.0.0.0 | |
| port_value: 80 | |
| filter_chains: | |
| - filters: | |
| - name: envoy.http_connection_manager |
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
| >> checking code style | |
| mkdir -p /go/bin | |
| curl -s -L https://github.com/dominikh/go-tools/releases/download/2019.1/staticcheck_linux_amd64 > /go/bin/staticcheck | |
| >> running staticcheck | |
| chmod +x /go/bin/staticcheck | |
| GO111MODULE=on go list -e -compiled -test=true -export=false -deps=true -find=false -tags= -- ./... > /dev/null | |
| go: finding github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973 | |
| go: finding github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf | |
| go: finding github.com/prometheus/client_golang v0.9.0 | |
| go: finding github.com/konsorten/go-windows-terminal-sequences v1.0.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
| function dumpvar(data) | |
| -- cache of tables already printed, to avoid infinite recursive loops | |
| local tablecache = {} | |
| local buffer = "" | |
| local padder = " " | |
| local function _dumpvar(d, depth) | |
| local t = type(d) | |
| local str = tostring(d) | |
| if (t == "table") then |
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
| FROM ubuntu:16.04 | |
| RUN apt-get update | |
| RUN apt-get --assume-yes --no-install-recommends install apt-transport-https ca-certificates curl | |
| RUN curl https://packagecloud.io/install/repositories/varnishcache/varnish40/script.deb.sh | bash | |
| RUN apt-get --assume-yes --no-install-recommends install varnish=4.0.5-1~xenial | |
| ENV prometheus_varnish_exporter_version=1.5 | |
| RUN curl --remote-name --location https://github.com/jonnenauha/prometheus_varnish_exporter/releases/download/$prometheus_varnish_exporter_version/prometheus_varnish_exporter-$prometheus_varnish_exporter_version.linux-amd64.tar.gz |
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
| import pdf from "npm:pdf-parse/lib/pdf-parse.js"; | |
| Deno.serve(async (req) => { | |
| try { | |
| const reqFormData = await req.formData(); | |
| if (!reqFormData.has("file")) { | |
| throw new Error("Missing required 'file' property from request data."); | |
| } |