Compare commits
1 Commits
chore/remo
...
18a048a69e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18a048a69e |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -18,7 +18,3 @@ vendor/
|
||||
# Data
|
||||
/data/
|
||||
*.sqlite3
|
||||
|
||||
# Local dev configs
|
||||
config.yaml
|
||||
config.dev.yml
|
||||
|
||||
11
config.dev.yml
Normal file
11
config.dev.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
# Development config for local Docker testing
|
||||
signing_key: "dev-signing-key-minimum-32-chars!"
|
||||
debug: true
|
||||
allow_http: true
|
||||
whitelist_hosts:
|
||||
- localhost
|
||||
- s3.sneak.cloud
|
||||
- static.sneak.cloud
|
||||
- sneak.berlin
|
||||
- github.com
|
||||
- user-images.githubusercontent.com
|
||||
10
config.yaml
Normal file
10
config.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
debug: true
|
||||
port: 8080
|
||||
state_dir: ./data
|
||||
signing_key: "test-signing-key-for-development-only"
|
||||
whitelist_hosts:
|
||||
- "*.example.com"
|
||||
- "images.unsplash.com"
|
||||
- "picsum.photos"
|
||||
- "s3.sneak.cloud"
|
||||
allow_http: false
|
||||
@@ -18,9 +18,9 @@ func TestImageRequest_SourceURL_DefaultHTTPS(t *testing.T) {
|
||||
|
||||
func TestImageRequest_SourceURL_AllowHTTP(t *testing.T) {
|
||||
req := &ImageRequest{
|
||||
SourceHost: "localhost:8080",
|
||||
SourcePath: "/photos/cat.jpg",
|
||||
AllowHTTP: true,
|
||||
SourceHost: "localhost:8080",
|
||||
SourcePath: "/photos/cat.jpg",
|
||||
AllowHTTP: true,
|
||||
}
|
||||
|
||||
got := req.SourceURL()
|
||||
|
||||
Reference in New Issue
Block a user