Revert "log should also authenticate, no?"

This reverts commit 62c6052faf.
This commit is contained in:
Peter Steinberger 2025-06-24 02:09:29 +02:00
parent 60baba5b75
commit 4e1d3a9a98
3 changed files with 11 additions and 14 deletions

View file

@ -742,15 +742,11 @@ export class VibeTunnelApp extends LitElement {
@close=${this.handleCloseSSHKeyManager}
></ssh-key-manager>
<!-- Version and logs link in bottom right (only show when authenticated) -->
${this.currentView !== 'auth'
? html`
<div class="fixed bottom-4 right-4 text-dark-text-muted text-xs font-mono">
<a href="/logs" class="hover:text-dark-text transition-colors">Logs</a>
<span class="ml-2">v${VERSION}</span>
</div>
`
: ''}
<!-- Version and logs link in bottom right -->
<div class="fixed bottom-4 right-4 text-dark-text-muted text-xs font-mono">
<a href="/logs" class="hover:text-dark-text transition-colors">Logs</a>
<span class="ml-2">v${VERSION}</span>
</div>
`;
}
}

View file

@ -49,7 +49,7 @@ export class LogViewer extends LitElement {
try {
// Get log info
const infoResponse = await fetch('/api/logs/info', {
headers: this.authClient.getAuthHeader(),
headers: { ...this.authClient.getAuthHeader() },
});
if (infoResponse.ok) {
const info = await infoResponse.json();
@ -58,7 +58,7 @@ export class LogViewer extends LitElement {
// Get raw logs
const response = await fetch('/api/logs/raw', {
headers: this.authClient.getAuthHeader(),
headers: { ...this.authClient.getAuthHeader() },
});
if (!response.ok) {
throw new Error('Failed to load logs');
@ -179,7 +179,7 @@ export class LogViewer extends LitElement {
try {
const response = await fetch('/api/logs/clear', {
method: 'DELETE',
headers: this.authClient.getAuthHeader(),
headers: { ...this.authClient.getAuthHeader() },
});
if (!response.ok) {
throw new Error('Failed to clear logs');
@ -194,7 +194,7 @@ export class LogViewer extends LitElement {
private async downloadLogs(): Promise<void> {
try {
const response = await fetch('/api/logs/raw', {
headers: this.authClient.getAuthHeader(),
headers: { ...this.authClient.getAuthHeader() },
});
if (!response.ok) {
throw new Error('Failed to download logs');

View file

@ -19,10 +19,11 @@ interface AuthenticatedRequest extends Request {
export function createAuthMiddleware(config: AuthConfig) {
return (req: AuthenticatedRequest, res: Response, next: NextFunction) => {
// Skip auth for health check endpoint, auth endpoints, and push notifications
// Skip auth for health check endpoint, auth endpoints, client logging, and push notifications
if (
req.path === '/api/health' ||
req.path.startsWith('/api/auth') ||
req.path.startsWith('/api/logs') ||
req.path.startsWith('/api/push')
) {
return next();