Skip to content

Instantly share code, notes, and snippets.

View puzan's full-sized avatar

Ilya Zonov puzan

View GitHub Profile
@puzan
puzan / install.sh
Created June 19, 2020 20:31
puzan.info - WebDav за https proxy
apt-get install -y nginx libnginx-mod-http-headers-more-filter
@puzan
puzan / nginx
Created June 19, 2020 20:30
puzan.info - WebDav за https proxy
server {
listen 80;
server_name www.read.puzan.info read.puzan.info;
location / {
# Rewrite destination header if it starts with https
set $destination $http_destination;
if ($destination ~ ^https://(.+)) {
set $destination http://$1;
more_set_input_headers "Destination: $destination";
@puzan
puzan / nginx.log
Created June 19, 2020 20:28
puzan.info - WebDav за https proxy
read_1 | 172.21.0.7 - puzan [18/Jun/2020:20:49:46 +0000] "PROPFIND /current/ HTTP/1.1" 207 2657 "-" "GoodReader"
read_1 | 172.21.0.7 - puzan [18/Jun/2020:20:49:46 +0000] "PUT /current/temp1 HTTP/1.1" 201 0 "-" "GoodReader"
read_1 | 2020/06/18 20:49:46 [error] 6#6: *7 client sent invalid "Destination" header: "https://read.puzan.info/current/some_book.pdf", client: 172.21.0.7, server: www.read.puzan.info, request: "MOVE /current/temp1 HTTP/1.1", host: "read.puzan.info"
read_1 | 172.21.0.7 - puzan [18/Jun/2020:20:49:46 +0000] "MOVE /current/temp1 HTTP/1.1" 400 173 "-" "GoodReader"
@puzan
puzan / docker-compose.yml
Last active June 19, 2020 20:37
puzan.info - WebDav за https proxy
services:
gitea:
image: gitea/gitea:1.11
labels:
SERVICE_3000_NAME: gitea
SERVICE_3000_CHECK_HTTP: /api/v1/version
SERVICE_3000_CHECK_INTERVAL: 15s
SERVICE_3000_TAGS: urlprefix-gitea.puzan.info:443/
SERVICE_22_NAME: gitea-ssh
SERVICE_22_CHECK_TCP: true
@puzan
puzan / Dockerfile
Last active August 6, 2018 20:17
Rabbit cluster restart issue
FROM rabbitmq:3.7-management-alpine
COPY rabbitmq.config /etc/rabbitmq/
RUN rabbitmq-plugins enable --offline rabbitmq_shovel rabbitmq_shovel_management rabbitmq_federation rabbitmq_federation_management
EXPOSE 25672
@puzan
puzan / bad.spec.js
Created March 26, 2017 18:56
Pact js testcase synchronisation
'use strict'
const path = require('path')
const Pact = require('pact')
const getMeDogs = require('../index').getMeDogs
describe("Dog's API", () => {
let url = 'http://localhost'
const port = 8989

Keybase proof

I hereby claim:

  • I am puzan on github.
  • I am puzan (https://keybase.io/puzan) on keybase.
  • I have a public key ASBa0PXrIHGIUrppxFnD0WsEpnrVWvQJ4yGMVS6s8WBkrgo

To claim this, I am signing this object: