No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Roshless aff8236360 return proper status codes on errors 1 week ago
assets Initial public commit 3 months ago
config another go mod try 3 weeks ago
database update comment for GetDatabase function 1 week ago
helpers update log message to be more useful 1 week ago
requests return proper status codes on errors 1 week ago
templates Package rework 3 weeks ago
.drone.yml test all packages 3 weeks ago
.gitignore update git ignore 1 month ago
LICENSE Initial public commit 3 months ago
README.md another go mod try 3 weeks ago
go.mod vscode generated additional modules added after updating via go get -u 3 weeks ago
go.sum vscode generated additional modules added after updating via go get -u 3 weeks ago
main.go another go mod try 3 weeks ago

README.md

gopaste

simple paste sever in golang

test only with nginx proxy (because I run it anyway)

config file by default is located in $HOME named gopaste.json.

nginx example config:

limit_req_zone $binary_remote_addr zone=limits:10m rate=10r/s;

upstream paste {
    server 127.0.0.1:9090;
}

server {
  listen 80;
  listen [::]:80;
  server_name paste.domain.tld;
  return 301 https://$server_name$request_uri;
}

server {
  listen 443 ssl http2;
  listen [::]:443 ssl http2;
  server_name paste.domain.tld;

  client_max_body_size 35M; # set desired max file size
  limit_req zone=limits burst=20 nodelay;
  limit_req_log_level warn;

  ssl_certificate /etc/letsencrypt/live/paste.domain.tld/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/paste.domain.tld/privkey.pem;
  
  location / {
    proxy_pass http://paste;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-Proto $scheme;
    #proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    #proxy_set_header Host $http_host;
  }
}