Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function POST(request: Request) {

const resp = await fetch(`${BACKEND_URL}/auth/github/install`, {
method: 'POST',
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body,
})

Expand Down
2 changes: 1 addition & 1 deletion components/frontend/src/app/api/auth/github/pat/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function POST(request: Request) {

const resp = await fetch(`${BACKEND_URL}/auth/github/pat`, {
method: 'POST',
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body,
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function POST(request: Request) {

const resp = await fetch(`${BACKEND_URL}/auth/gitlab/connect`, {
method: 'POST',
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body,
})

Expand Down
2 changes: 1 addition & 1 deletion components/frontend/src/app/api/auth/jira/connect/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function POST(request: Request) {

const resp = await fetch(`${BACKEND_URL}/auth/jira/connect`, {
method: 'POST',
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body,
})

Expand Down
2 changes: 1 addition & 1 deletion components/frontend/src/app/api/cluster-info/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export async function GET() {
const response = await fetch(`${BACKEND_URL}/cluster-info`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
},
});

Expand Down
2 changes: 1 addition & 1 deletion components/frontend/src/app/api/feature-flags/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export async function GET(request: NextRequest) {
method: 'GET',
headers: {
Authorization: clientKey,
'Content-Type': 'application/json',
'Accept': 'application/json',
},
next: { revalidate: 15 },
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function POST(
`${BACKEND_URL}/projects/${encodeURIComponent(name)}/agentic-sessions/${encodeURIComponent(sessionName)}/git/configure-remote`,
{
method: 'POST',
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body,
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function POST(
`${BACKEND_URL}/projects/${encodeURIComponent(name)}/agentic-sessions/${encodeURIComponent(sessionName)}/repos`,
{
method: 'POST',
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body,
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function POST(
`${BACKEND_URL}/projects/${encodeURIComponent(name)}/agentic-sessions/${encodeURIComponent(sessionName)}/workflow`,
{
method: 'POST',
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body,
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export async function POST(

const response = await fetch(`${BACKEND_URL}/projects/${encodeURIComponent(name)}/agentic-sessions`, {
method: 'POST',
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function PUT(
`${BACKEND_URL}/projects/${encodeURIComponent(projectName)}/feature-flags/${encodeURIComponent(flagName)}/override`,
{
method: "PUT",
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body,
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function POST(

const response = await fetch(`${BACKEND_URL}/projects/${name}/keys`, {
method: 'POST',
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body: JSON.stringify(body),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function POST(

const response = await fetch(`${BACKEND_URL}/projects/${name}/permissions`, {
method: 'POST',
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body: JSON.stringify(body),
});

Expand Down
2 changes: 1 addition & 1 deletion components/frontend/src/app/api/projects/[name]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export async function PUT(

const response = await fetch(`${BACKEND_URL}/projects/${name}`, {
method: 'PUT',
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body: JSON.stringify(body),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ export async function GET(
const response = await fetch(`${BACKEND_URL}/projects/${projectName}/settings`, {
method: "GET",
headers: {
"Content-Type": "application/json",
// Forward authentication headers from the client request
"Accept": "application/json",
"X-User-ID": request.headers.get("X-User-ID") || "",
"X-User-Groups": request.headers.get("X-User-Groups") || "",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export async function POST(
const body = await request.text()
const resp = await fetch(`${BACKEND_URL}/projects/${encodeURIComponent(name)}/users/forks`, {
method: 'POST',
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body,
})
const data = await resp.text()
Expand Down
2 changes: 1 addition & 1 deletion components/frontend/src/app/api/projects/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function POST(request: NextRequest) {

const response = await fetch(`${BACKEND_URL}/projects`, {
method: 'POST',
headers,
headers: { ...headers, 'Content-Type': 'application/json' },
body: body,
});

Expand Down
2 changes: 1 addition & 1 deletion components/frontend/src/app/api/version/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function GET() {
const response = await fetch(`${BACKEND_URL}/version`, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
},
});

Expand Down
2 changes: 1 addition & 1 deletion components/frontend/src/app/api/workflows/ootb/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export async function GET(request: NextRequest) {

// Forward authorization header if present (enables GitHub token lookup for better rate limits)
const headers: HeadersInit = {
"Content-Type": "application/json",
"Accept": "application/json",
};
const authHeader = request.headers.get("Authorization");
if (authHeader) {
Expand Down
2 changes: 1 addition & 1 deletion components/frontend/src/lib/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function extractAccessToken(request: Request): string | undefined {
// Build headers to forward to backend, using only real incoming values.
export function buildForwardHeaders(request: Request, extra?: Record<string, string>): ForwardHeaders {
const headers: ForwardHeaders = {
'Content-Type': 'application/json',
'Accept': 'application/json',
};

const xfUser = request.headers.get('X-Forwarded-User');
Expand Down