mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-27 15:17:38 +00:00
Revert "log should also authenticate, no?"
This reverts commit 62c6052faf.
This commit is contained in:
parent
60baba5b75
commit
4e1d3a9a98
3 changed files with 11 additions and 14 deletions
|
|
@ -742,15 +742,11 @@ export class VibeTunnelApp extends LitElement {
|
||||||
@close=${this.handleCloseSSHKeyManager}
|
@close=${this.handleCloseSSHKeyManager}
|
||||||
></ssh-key-manager>
|
></ssh-key-manager>
|
||||||
|
|
||||||
<!-- Version and logs link in bottom right (only show when authenticated) -->
|
<!-- Version and logs link in bottom right -->
|
||||||
${this.currentView !== 'auth'
|
<div class="fixed bottom-4 right-4 text-dark-text-muted text-xs font-mono">
|
||||||
? html`
|
<a href="/logs" class="hover:text-dark-text transition-colors">Logs</a>
|
||||||
<div class="fixed bottom-4 right-4 text-dark-text-muted text-xs font-mono">
|
<span class="ml-2">v${VERSION}</span>
|
||||||
<a href="/logs" class="hover:text-dark-text transition-colors">Logs</a>
|
</div>
|
||||||
<span class="ml-2">v${VERSION}</span>
|
|
||||||
</div>
|
|
||||||
`
|
|
||||||
: ''}
|
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ export class LogViewer extends LitElement {
|
||||||
try {
|
try {
|
||||||
// Get log info
|
// Get log info
|
||||||
const infoResponse = await fetch('/api/logs/info', {
|
const infoResponse = await fetch('/api/logs/info', {
|
||||||
headers: this.authClient.getAuthHeader(),
|
headers: { ...this.authClient.getAuthHeader() },
|
||||||
});
|
});
|
||||||
if (infoResponse.ok) {
|
if (infoResponse.ok) {
|
||||||
const info = await infoResponse.json();
|
const info = await infoResponse.json();
|
||||||
|
|
@ -58,7 +58,7 @@ export class LogViewer extends LitElement {
|
||||||
|
|
||||||
// Get raw logs
|
// Get raw logs
|
||||||
const response = await fetch('/api/logs/raw', {
|
const response = await fetch('/api/logs/raw', {
|
||||||
headers: this.authClient.getAuthHeader(),
|
headers: { ...this.authClient.getAuthHeader() },
|
||||||
});
|
});
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error('Failed to load logs');
|
throw new Error('Failed to load logs');
|
||||||
|
|
@ -179,7 +179,7 @@ export class LogViewer extends LitElement {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/api/logs/clear', {
|
const response = await fetch('/api/logs/clear', {
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
headers: this.authClient.getAuthHeader(),
|
headers: { ...this.authClient.getAuthHeader() },
|
||||||
});
|
});
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error('Failed to clear logs');
|
throw new Error('Failed to clear logs');
|
||||||
|
|
@ -194,7 +194,7 @@ export class LogViewer extends LitElement {
|
||||||
private async downloadLogs(): Promise<void> {
|
private async downloadLogs(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/api/logs/raw', {
|
const response = await fetch('/api/logs/raw', {
|
||||||
headers: this.authClient.getAuthHeader(),
|
headers: { ...this.authClient.getAuthHeader() },
|
||||||
});
|
});
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error('Failed to download logs');
|
throw new Error('Failed to download logs');
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,11 @@ interface AuthenticatedRequest extends Request {
|
||||||
|
|
||||||
export function createAuthMiddleware(config: AuthConfig) {
|
export function createAuthMiddleware(config: AuthConfig) {
|
||||||
return (req: AuthenticatedRequest, res: Response, next: NextFunction) => {
|
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 (
|
if (
|
||||||
req.path === '/api/health' ||
|
req.path === '/api/health' ||
|
||||||
req.path.startsWith('/api/auth') ||
|
req.path.startsWith('/api/auth') ||
|
||||||
|
req.path.startsWith('/api/logs') ||
|
||||||
req.path.startsWith('/api/push')
|
req.path.startsWith('/api/push')
|
||||||
) {
|
) {
|
||||||
return next();
|
return next();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue