Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
29e8fc6
Merge branch 'task/aliases-ux-update' into rc-0.1.1
jurajhilje Nov 14, 2025
29145db
Merge branch 'task/recipients-ux-update' into rc-0.1.1
jurajhilje Nov 14, 2025
a0b7317
Merge branch 'feature/alias-export-2' into rc-0.1.1
jurajhilje Nov 14, 2025
df1a176
Merge branch 'feature/discard-logs' into rc-0.1.1
jurajhilje Nov 14, 2025
3aaa5e0
Merge branch 'feature/forward-header-option' into rc-0.1.1
jurajhilje Nov 14, 2025
f03cfe1
feat(model): create access_key.go
jurajhilje Nov 14, 2025
15ffa3b
feat(repository): create access_key.go
jurajhilje Nov 14, 2025
2d71684
feat(service): create access_key.go
jurajhilje Nov 14, 2025
a5d0b82
feat(api): create access_key.go
jurajhilje Nov 14, 2025
975c727
feat(api): update access_key.go
jurajhilje Nov 14, 2025
ede5c20
feat(api): update routes.go
jurajhilje Nov 14, 2025
34f4bdf
Merge branch 'feature/discard-logs' into rc-0.1.1
jurajhilje Nov 20, 2025
0fb5c1c
Merge branch 'rc-0.1.1' into feature/access-keys
jurajhilje Nov 20, 2025
fc70c3d
feat(api): update access_key.go
jurajhilje Nov 20, 2025
0c075c0
Merge branch 'feature/alias-export-2' into rc-0.1.1
jurajhilje Nov 21, 2025
acb3ef5
Merge branch 'task/update-privacy-policy' into rc-0.1.1
jurajhilje Nov 21, 2025
90a7a8e
Merge branch 'feature/bounce-logs' into rc-0.1.1
jurajhilje Nov 21, 2025
bab913d
Merge branch 'rc-0.1.1' into feature/access-keys
jurajhilje Nov 21, 2025
a9aa8ea
Merge branch 'feature/bounce-logs' into rc-0.1.1
jurajhilje Nov 21, 2025
c746f1b
Merge branch 'rc-0.1.1' into feature/access-keys
jurajhilje Nov 21, 2025
33c5e18
feat(cron): update user.go
jurajhilje Nov 22, 2025
51f26a3
feat(api): update routes.go
jurajhilje Nov 22, 2025
b9b927d
feat(service): update access_key.go
jurajhilje Nov 22, 2025
3968888
feat(app): create AccountAccessKeys.vue
jurajhilje Nov 22, 2025
87f58e6
feat(api): update access_key.go
jurajhilje Nov 23, 2025
197696c
feat(app): create AccessKeysCreate.vue
jurajhilje Nov 23, 2025
e4272fd
feat(app): update AccessKeysCreate.vue
jurajhilje Nov 23, 2025
5e9a78a
feat(app): update AccessKeysCreate.vue
jurajhilje Nov 23, 2025
86b1291
feat(model): update access_key.go
jurajhilje Nov 23, 2025
609857f
tests(model): create access_key_test.go
jurajhilje Nov 23, 2025
6480387
feat(middleware): update auth.go
jurajhilje Nov 25, 2025
f64a89c
Merge branch 'main' into feature/access-keys
jurajhilje Nov 26, 2025
e557b39
Merge branch 'main' into feature/access-keys
jurajhilje Nov 26, 2025
10eee2d
tests: update access_key_test.go
jurajhilje Nov 26, 2025
6e20dba
feat(api): update routes.go
jurajhilje Nov 27, 2025
dd63882
feat(model): update access_key.go
jurajhilje Nov 29, 2025
4951fef
feat(service): update access_key.go
jurajhilje Nov 29, 2025
2ce2303
feat(api): update routes.go
jurajhilje Nov 29, 2025
efbf532
Merge branch 'main' into feature/access-keys
jurajhilje Dec 1, 2025
dbbf568
feat(api): update config.go
jurajhilje Dec 1, 2025
a140661
feat(api): update routes.go
jurajhilje Dec 1, 2025
2379d57
feat(api): update routes.go
jurajhilje Dec 2, 2025
7ee73ee
feat(api): update access_key.go
jurajhilje Dec 3, 2025
04d8edf
feat(cron): update session.go
jurajhilje Dec 3, 2025
f87f56c
feat(api): update access_key.go
jurajhilje Dec 4, 2025
20c2c93
feat(api): update access_key.go
jurajhilje Dec 4, 2025
7dea872
feat(api): update access_key.go
jurajhilje Dec 4, 2025
3a1d423
feat(api): update alias.go
jurajhilje Dec 4, 2025
99e50e8
feat(api): update access_key.go
jurajhilje Dec 7, 2025
33e1d32
feat(cron): update session.go
jurajhilje Dec 7, 2025
762cd6f
feat(api): update access_key.go
jurajhilje Dec 8, 2025
e038200
docs: update docs.go
jurajhilje Dec 8, 2025
065a3a6
docs: update docs.go
jurajhilje Dec 8, 2025
eb69bd4
feat(api): update access_key.go
jurajhilje Dec 9, 2025
6589c31
docs: update docs.go
jurajhilje Dec 9, 2025
fcce8e2
Merge branch 'main' into feature/access-keys
jurajhilje Dec 14, 2025
8edac4c
Merge branch 'main' into feature/access-keys
jurajhilje Jan 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion api/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ API_NAME="Service Name"
API_PORT="3000"
API_ALLOW_ORIGIN="http://localhost:3001"
TOKEN_SECRET="secret"
TOKEN_EXPIRATION=60m
TOKEN_EXPIRATION=168h
API_TOKEN_EXPIRATION=8760h
PSK=""
PSK_ALLOW_ORIGIN="http://localhost:3001"
DOMAINS="example1.net,example2.com"
Expand Down
64 changes: 36 additions & 28 deletions api/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ import (
)

type APIConfig struct {
FQDN string
Name string
Port string
ApiAllowOrigin string
TokenSecret string
TokenExpiration time.Duration
PSK string
PSKAllowOrigin string
Domains string
LogFile string
BasicAuthUser string
BasicAuthPassword string
SignupWebhookURL string
SignupWebhookPSK string
FQDN string
Name string
Port string
ApiAllowOrigin string
TokenSecret string
TokenExpiration time.Duration
ApiTokenExpiration time.Duration
PSK string
PSKAllowOrigin string
Domains string
LogFile string
BasicAuthUser string
BasicAuthPassword string
SignupWebhookURL string
SignupWebhookPSK string
}

type DBConfig struct {
Expand Down Expand Up @@ -85,6 +86,12 @@ func New() (Config, error) {
return Config{}, err
}

apiTokenExpStr := os.Getenv("API_TOKEN_EXPIRATION")
apiTokenExp, err := time.ParseDuration(apiTokenExpStr)
if err != nil {
return Config{}, err
}

otpExpStr := os.Getenv("OTP_EXPIRATION")
otpExp, err := time.ParseDuration(otpExpStr)
if err != nil {
Expand Down Expand Up @@ -141,20 +148,21 @@ func New() (Config, error) {

return Config{
API: APIConfig{
FQDN: os.Getenv("FQDN"),
Name: os.Getenv("API_NAME"),
Port: os.Getenv("API_PORT"),
ApiAllowOrigin: os.Getenv("API_ALLOW_ORIGIN"),
TokenSecret: os.Getenv("TOKEN_SECRET"),
TokenExpiration: tokenExp,
PSK: os.Getenv("PSK"),
PSKAllowOrigin: os.Getenv("PSK_ALLOW_ORIGIN"),
Domains: os.Getenv("DOMAINS"),
LogFile: os.Getenv("LOG_FILE"),
BasicAuthUser: os.Getenv("BASIC_AUTH_USER"),
BasicAuthPassword: os.Getenv("BASIC_AUTH_PASSWORD"),
SignupWebhookURL: os.Getenv("SIGNUP_WEBHOOK_URL"),
SignupWebhookPSK: os.Getenv("SIGNUP_WEBHOOK_PSK"),
FQDN: os.Getenv("FQDN"),
Name: os.Getenv("API_NAME"),
Port: os.Getenv("API_PORT"),
ApiAllowOrigin: os.Getenv("API_ALLOW_ORIGIN"),
TokenSecret: os.Getenv("TOKEN_SECRET"),
TokenExpiration: tokenExp,
ApiTokenExpiration: apiTokenExp,
PSK: os.Getenv("PSK"),
PSKAllowOrigin: os.Getenv("PSK_ALLOW_ORIGIN"),
Domains: os.Getenv("DOMAINS"),
LogFile: os.Getenv("LOG_FILE"),
BasicAuthUser: os.Getenv("BASIC_AUTH_USER"),
BasicAuthPassword: os.Getenv("BASIC_AUTH_PASSWORD"),
SignupWebhookURL: os.Getenv("SIGNUP_WEBHOOK_URL"),
SignupWebhookPSK: os.Getenv("SIGNUP_WEBHOOK_PSK"),
},
DB: DBConfig{
Hosts: dbHosts,
Expand Down
Loading
Loading