Gemini server
Go to file
Aaron Fischer bd0555069e Strip path from root
If there is a path (the URL path) specified under paths in the
configuration, which points to a root (a physical folder on the
filesystem), this path should not be attached to the root. This fix will
do that. It strips the path from the root.

Example configuration:

hosts:
  localhost:
    paths:
      -
        path: /a
        root: public/aroot
      -
        path: /
        root: public

Filesystem:
+ public
  + index.gmi
  + aroot
    + index.gmi
2021-06-03 23:47:46 +02:00
.gitignore Initial commit 2020-10-29 13:35:48 -07:00
.gitlab-ci.yml Initial commit 2020-10-29 13:35:48 -07:00
CONFIGURATION.md Migrate to code.rocketnine.space 2021-04-07 20:53:11 -07:00
LICENSE Initial commit 2020-10-29 13:35:48 -07:00
PROPOSALS.md Fix cache attribute parsing 2020-11-09 21:12:22 -08:00
README.md Migrate to code.rocketnine.space 2021-04-07 20:53:11 -07:00
config.go Require trailing slash when specifying directory path 2020-12-05 22:49:53 -08:00
go.mod Migrate to code.rocketnine.space 2021-04-07 20:53:11 -07:00
go.sum Migrate to code.rocketnine.space 2021-04-07 20:53:11 -07:00
main.go Print access log by default 2020-11-16 20:21:00 -08:00
serve_command.go Support logging requests 2020-11-12 10:00:22 -08:00
serve_fcgi.go Update dependencies 2021-03-07 10:58:49 -08:00
serve_file.go Support directory listing via HTTPS 2020-12-03 16:45:20 -08:00
serve_https.go Strip path from root 2021-06-03 23:47:46 +02:00
serve_proxy.go Support logging requests 2020-11-12 10:00:22 -08:00
server.go Set minimum TLS version to 1.2 2021-01-03 11:34:06 +01:00
util.go Support directory listing 2020-10-30 18:31:13 -07:00

README.md

twins

Donate

Gemini server

Warning: The twins configuration format is still under development. Breaking changes may be made.

This page is also available at gemini://twins.rocketnine.space

Features

  • Serve static files
    • Detect content type
    • Specify content type for files with matching extension
    • List files and directories (when enabled)
  • Reverse proxy requests
  • Serve Gemini content via HTTPS
    • Pages are converted automatically by gmitohtml
  • Reload configuration on SIGHUP

Proposals

twins includes features that are not yet part of the Gemini specification. See PROPOSALS.md

Download

twins is written in Go. Run the following command to download and build twins from source.

go get code.rocketnine.space/tslocum/twins

The resulting binary is available as ~/go/bin/twins.

Configure

See CONFIGURATION.md

Support

Please share issues and suggestions here.

Dependencies