diff options
| author | tjpcc <tjp@ctrl-c.club> | 2023-09-08 14:54:50 -0600 |
|---|---|---|
| committer | tjpcc <tjp@ctrl-c.club> | 2023-09-08 14:55:02 -0600 |
| commit | 7517538d2fccd75dbfb4f8b5ac9194bf0bbbda76 (patch) | |
| tree | 6e1e530beb0693119ef11a4a2d7062bf774ad5ec /config.go | |
| parent | 62eb4353f72ad2fee2d5e30a6444c980ecf0d9ab (diff) | |
fixes & improvements
- refactored main.go to do everything which requires root *first*,
before dropping privs. this includes binding to finger and gopher
ports.
- added gopher support!
- fixed CGI handling
- new cgi-bin/private directory handling in gemini which requires
specific TLS client certs (can't do this in gopher, no TLS)
- sliderule version bump brings in lots of fixes on the sliderule side
Diffstat (limited to 'config.go')
| -rw-r--r-- | config.go | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -16,17 +16,18 @@ type config struct { hostname string geminiRoot string + gopherRoot string tlsKeyFile string tlsCertFile string - uploaderFingerprints []string + privilegedUsers []string fingerResponses map[string]string } func configure() config { - fingerprints := strings.Split(os.Getenv("UPLOADER_FINGERPRINTS"), ",") + privileged := strings.Split(os.Getenv("PRIVILEGED_FINGERPRINTS"), ",") fingers := map[string]string{} for _, pair := range os.Environ() { @@ -40,10 +41,11 @@ func configure() config { return config{ hostname: os.Getenv("HOST_NAME"), geminiRoot: os.Getenv("GEMINI_ROOT"), + gopherRoot: os.Getenv("GOPHER_ROOT"), tlsKeyFile: os.Getenv("TLS_KEY_FILE"), tlsCertFile: os.Getenv("TLS_CERT_FILE"), - uploaderFingerprints: fingerprints, + privilegedUsers: privileged, fingerResponses: fingers, } |
