File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
packages/web/src/app/[domain]/repos Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ Unreleased]
99
10+ ### Fixed
11+ - Fixed repository images not loading when anonymous access is disabled. [ #703 ] ( https://github.com/sourcebot-dev/sourcebot/pull/703 )
12+
1013### Changed
1114- Enable browser assisted autofill for username and password.[ #696 ] ( https://github.com/sourcebot-dev/sourcebot/pull/696 )
1215
Original file line number Diff line number Diff line change @@ -110,6 +110,10 @@ export const getColumns = (context: ColumnsContext): ColumnDef<Repo>[] => [
110110 const repo = row . original ;
111111 const codeHostIcon = getCodeHostIcon ( repo . codeHostType ) ;
112112 const repoImageSrc = repo . imageUrl ? getRepoImageSrc ( repo . imageUrl , repo . id ) : undefined ;
113+ // Internal API routes require authentication headers (cookies/API keys) to be passed through.
114+ // Next.js Image Optimization doesn't forward these headers, so we use unoptimized=true
115+ // to bypass the optimization and make direct requests that include auth headers.
116+ const isInternalApiImage = repoImageSrc ?. startsWith ( '/api/' ) ;
113117
114118 return (
115119 < div className = "flex flex-row gap-2 items-center" >
@@ -121,6 +125,7 @@ export const getColumns = (context: ColumnsContext): ColumnDef<Repo>[] => [
121125 width = { 32 }
122126 height = { 32 }
123127 className = "object-cover"
128+ unoptimized = { isInternalApiImage }
124129 />
125130 ) : < Image
126131 src = { codeHostIcon . src }
Original file line number Diff line number Diff line change @@ -22,9 +22,6 @@ interface ReposPageProps {
2222export default async function ReposPage ( props : ReposPageProps ) {
2323 const params = await props . searchParams ;
2424
25- console . log ( 'asdf:' ) ;
26- console . log ( z . coerce . number ( ) . int ( ) . safeParse ( params . page ) . error ) ;
27-
2825 // Parse pagination parameters with defaults
2926 const page = numberSchema . safeParse ( params . page ) . data ?? 1 ;
3027 const pageSize = numberSchema . safeParse ( params . pageSize ) . data ?? 5 ;
You can’t perform that action at this time.
0 commit comments