Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 04bdf641c7 | |||
| fbf5e968d9 |
@@ -347,8 +347,8 @@ jobs:
|
||||
- name: Update vault dependency (Unix)
|
||||
if: matrix.goos != 'windows'
|
||||
env:
|
||||
GOPRIVATE: ""
|
||||
GOPROXY: direct
|
||||
GOSUMDB: off
|
||||
run: |
|
||||
set -x
|
||||
VAULT_VERSION="${{ steps.vault.outputs.version }}"
|
||||
@@ -360,14 +360,14 @@ jobs:
|
||||
sed -i "s|replace git.marketally.com/gitcaddy/gitcaddy-vault => ../gitcaddy-vault|replace git.marketally.com/gitcaddy/gitcaddy-vault => git.marketally.com/gitcaddy/gitcaddy-vault $VAULT_VERSION|" go.mod
|
||||
fi
|
||||
cat go.mod | grep -A2 "gitcaddy-vault" || true
|
||||
go mod download
|
||||
go mod download git.marketally.com/gitcaddy/gitcaddy-vault
|
||||
|
||||
- name: Update vault dependency (Windows)
|
||||
if: matrix.goos == 'windows'
|
||||
shell: pwsh
|
||||
env:
|
||||
GOPRIVATE: ""
|
||||
GOPROXY: direct
|
||||
GOSUMDB: off
|
||||
run: |
|
||||
$vaultVersion = "${{ steps.vault-win.outputs.version }}"
|
||||
Write-Host "Building with vault $vaultVersion"
|
||||
@@ -375,7 +375,7 @@ jobs:
|
||||
$content = $content -replace 'replace git.marketally.com/gitcaddy/gitcaddy-vault => ../gitcaddy-vault', "replace git.marketally.com/gitcaddy/gitcaddy-vault => git.marketally.com/gitcaddy/gitcaddy-vault $vaultVersion"
|
||||
Set-Content go.mod $content -NoNewline
|
||||
Get-Content go.mod | Select-String "gitcaddy/vault" -Context 0,2
|
||||
go mod download
|
||||
go mod download git.marketally.com/gitcaddy/gitcaddy-vault
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
|
||||
2
go.mod
2
go.mod
@@ -16,7 +16,7 @@ require (
|
||||
connectrpc.com/connect v1.18.1
|
||||
|
||||
// GitCaddy Vault plugin (compiled-in)
|
||||
git.marketally.com/gitcaddy/gitcaddy-vault v1.0.60
|
||||
git.marketally.com/gitcaddy/gitcaddy-vault v1.0.61
|
||||
gitea.com/go-chi/binding v0.0.0-20240430071103-39a851e106ed
|
||||
gitea.com/go-chi/cache v0.2.1
|
||||
gitea.com/go-chi/captcha v0.0.0-20240315150714-fb487f629098
|
||||
|
||||
@@ -76,6 +76,13 @@ func ServeLandingPage(ctx *context.Context) {
|
||||
}
|
||||
}
|
||||
|
||||
// Handle social preview image before static routes so a catch-all
|
||||
// like /*.png cannot shadow the auto-generated OG card.
|
||||
if requestPath == "/social-preview.png" || requestPath == "/social-preview" {
|
||||
serveSocialPreview(ctx, repo)
|
||||
return
|
||||
}
|
||||
|
||||
// Check for static route file serving
|
||||
if len(config.Advanced.StaticRoutes) > 0 {
|
||||
cleanPath := path.Clean(requestPath)
|
||||
@@ -91,12 +98,6 @@ func ServeLandingPage(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
// Handle social preview image
|
||||
if requestPath == "/social-preview.png" || requestPath == "/social-preview" {
|
||||
serveSocialPreview(ctx, repo)
|
||||
return
|
||||
}
|
||||
|
||||
// Handle asset requests (gallery images, custom assets)
|
||||
// Uses /pages/assets/ to avoid conflict with Gitea's static /assets/ route
|
||||
if assetPath, found := strings.CutPrefix(requestPath, "/pages/assets/"); found && assetPath != "" {
|
||||
|
||||
Reference in New Issue
Block a user