Skip to content

Commit acd6fb0

Browse files
author
Andrea Spacca
authored
remove tor, remove bitcoing, fix contact us (#447)
1 parent 6f49951 commit acd6fb0

File tree

7 files changed

+25
-1
lines changed

7 files changed

+25
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ temp-path | path to temp folder | system temp | TEMP_PATH |
9090
web-path | path to static web files (for development or custom front end) | | WEB_PATH |
9191
proxy-path | path prefix when service is run behind a proxy | | PROXY_PATH |
9292
proxy-port | port of the proxy when the service is run behind a proxy | | PROXY_PORT |
93+
email-contact | email contact for the front end | | EMAIL_CONTACT |
9394
ga-key | google analytics key for the front end | | GA_KEY |
9495
provider | which storage provider to use | (s3, storj, gdrive or local) |
9596
uservoice-key | user voice key for the front end | | USERVOICE_KEY |

cmd/cmd.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ var globalFlags = []cli.Flag{
9898
Value: "",
9999
EnvVar: "PROXY_PORT",
100100
},
101+
cli.StringFlag{
102+
Name: "email-contact",
103+
Usage: "email address to link in Contact Us (front end)",
104+
Value: "",
105+
EnvVar: "EMAIL_CONTACT",
106+
},
101107
cli.StringFlag{
102108
Name: "ga-key",
103109
Usage: "key for google analytics (front end)",
@@ -348,6 +354,10 @@ func New() *Cmd {
348354
options = append(options, server.ProxyPort(v))
349355
}
350356

357+
if v := c.String("email-contact"); v != "" {
358+
options = append(options, server.EmailContact(v))
359+
}
360+
351361
if v := c.String("ga-key"); v != "" {
352362
options = append(options, server.GoogleAnalytics(v))
353363
}

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
proxy-path = mkOption { type = types.nullOr types.str; description = "path prefix when service is run behind a proxy"; };
5252
proxy-port = mkOption { type = types.nullOr types.str; description = "port of the proxy when the service is run behind a proxy"; };
5353
ga-key = mkOption { type = types.nullOr types.str; description = "google analytics key for the front end"; };
54+
email-contact = mkOption { type = types.nullOr types.str; description = "email contact for the front end"; };
5455
uservoice-key = mkOption { type = types.nullOr types.str; description = "user voice key for the front end"; };
5556
lets-encrypt-hosts = mkOption { type = types.nullOr (types.listOf types.str); description = "hosts to use for lets encrypt certificates"; };
5657
log = mkOption { type = types.nullOr types.str; description = "path to log file"; };

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
1313
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
1414
github.com/dutchcoders/go-virustotal v0.0.0-20140923143438-24cc8e6fa329
15-
github.com/dutchcoders/transfer.sh-web v0.0.0-20210819203540-bbdd40be1311
15+
github.com/dutchcoders/transfer.sh-web v0.0.0-20211215083008-31e11925a9d3
1616
github.com/elazarl/go-bindata-assetfs v1.0.1
1717
github.com/fatih/color v1.10.0
1818
github.com/garyburd/redigo v1.6.2 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ github.com/dutchcoders/transfer.sh-web v0.0.0-20210723094506-f0946ebceb7a h1:+N7
8888
github.com/dutchcoders/transfer.sh-web v0.0.0-20210723094506-f0946ebceb7a/go.mod h1:F6Q37CxDh2MHr5KXkcZmNB3tdkK7v+bgE+OpBY+9ilI=
8989
github.com/dutchcoders/transfer.sh-web v0.0.0-20210819203540-bbdd40be1311 h1:/Rwuhcp8ZLUauWajAgMyy6AiVbobvD52I+/OnzThK0A=
9090
github.com/dutchcoders/transfer.sh-web v0.0.0-20210819203540-bbdd40be1311/go.mod h1:F6Q37CxDh2MHr5KXkcZmNB3tdkK7v+bgE+OpBY+9ilI=
91+
github.com/dutchcoders/transfer.sh-web v0.0.0-20211215083008-31e11925a9d3 h1:HyfU90/8y9S5IkHTQgIfzs4dT3iagbJUJLncCsSwZCI=
92+
github.com/dutchcoders/transfer.sh-web v0.0.0-20211215083008-31e11925a9d3/go.mod h1:F6Q37CxDh2MHr5KXkcZmNB3tdkK7v+bgE+OpBY+9ilI=
9193
github.com/elazarl/go-bindata-assetfs v1.0.1 h1:m0kkaHRKEu7tUIUFVwhGGGYClXvyl4RE03qmvRTNfbw=
9294
github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
9395
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=

server/handlers.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ func (s *Server) viewHandler(w http.ResponseWriter, r *http.Request) {
253253
data := struct {
254254
Hostname string
255255
WebAddress string
256+
EmailContact string
256257
GAKey string
257258
UserVoiceKey string
258259
PurgeTime string
@@ -262,6 +263,7 @@ func (s *Server) viewHandler(w http.ResponseWriter, r *http.Request) {
262263
}{
263264
hostname,
264265
webAddress,
266+
s.emailContact,
265267
s.gaKey,
266268
s.userVoiceKey,
267269
purgeTime,

server/server.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ func CorsDomains(s string) OptionFn {
9999

100100
}
101101

102+
// EmailContact sets email contact
103+
func EmailContact(emailContact string) OptionFn {
104+
return func(srvr *Server) {
105+
srvr.emailContact = emailContact
106+
}
107+
}
108+
102109
// GoogleAnalytics sets GA key
103110
func GoogleAnalytics(gaKey string) OptionFn {
104111
return func(srvr *Server) {
@@ -339,6 +346,7 @@ type Server struct {
339346
webPath string
340347
proxyPath string
341348
proxyPort string
349+
emailContact string
342350
gaKey string
343351
userVoiceKey string
344352

0 commit comments

Comments
 (0)