8000 [pull] main from miniflux:main by pull[bot] · Pull Request #259 · abcdlsj/miniflux · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 4 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
],
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"moby": false
}
},
"customizations": {
"vscode": {
Expand All @@ -28,4 +30,4 @@
]
}
}
}
}
3 changes: 1 addition & 2 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: '3.8'
services:
app:
image: mcr.microsoft.com/devcontainers/go:1.23
image: mcr.microsoft.com/devcontainers/go:1-trixie # https://www.debian.org/releases/trixie/index.en.html
volumes:
- ..:/workspace:cached
command: sleep infinity
Expand Down
15 changes: 15 additions & 0 deletions internal/reader/rewrite/referer_override_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ func TestGetRefererForURL(t *testing.T) {
url: "https://example.com/image.jpg",
expected: "",
},
{
name: "Exact hostname match",
url: "https://appinn.com/some/path",
expected: "https://appinn.com",
},
{
name: "Only hostnames starting with a dot should match as suffix",
url: "https://fake-appinn.com/some/path",
expected: "",
},
{
name: "Subdomain match with suffix",
url: "https://sub.moyu.im/image.png",
expected: "https://i.jandan.net",
},
}

for _, tc := range testCases {
Expand Down
Loading
0