mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-07-20 10:04:08 +00:00
Change to "proxy-forwarded-header" and add "proxy-trusted-addrs"
This commit is contained in:
parent
2cb4d089ab
commit
849884c947
12 changed files with 482 additions and 280 deletions
|
@ -167,11 +167,6 @@ func TestSplitKV(t *testing.T) {
|
|||
require.Equal(t, "value=with=separator", value)
|
||||
}
|
||||
|
||||
func TestLastString(t *testing.T) {
|
||||
require.Equal(t, "last", LastString([]string{"first", "second", "last"}, "default"))
|
||||
require.Equal(t, "default", LastString([]string{}, "default"))
|
||||
}
|
||||
|
||||
func TestQuoteCommand(t *testing.T) {
|
||||
require.Equal(t, `ls -al "Document Folder"`, QuoteCommand([]string{"ls", "-al", "Document Folder"}))
|
||||
require.Equal(t, `rsync -av /home/phil/ root@example.com:/home/phil/`, QuoteCommand([]string{"rsync", "-av", "/home/phil/", "root@example.com:/home/phil/"}))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue