-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginx.conf
More file actions
64 lines (58 loc) · 1.92 KB
/
Copy pathnginx.conf
File metadata and controls
64 lines (58 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
server {
listen 80;
server_name localhost;
# Página principal com informações sobre os logs
location / {
return 200 '<!DOCTYPE html>
<html>
<head>
<title>MCP Browser Tools - Logs</title>
<style>
body { font-family: Arial, sans-serif; margin: 40px; }
.header { background: #f4f4f4; padding: 20px; border-radius: 5px; }
.log-entry { background: #fff; border: 1px solid #ddd; margin: 10px 0; padding: 15px; border-radius: 5px; }
.error { border-left: 4px solid #e74c3c; }
.warning { border-left: 4px solid #f39c12; }
.info { border-left: 4px solid #3498db; }
pre { background: #f8f9fa; padding: 10px; border-radius: 3px; overflow-x: auto; }
</style>
</head>
<body>
<div class="header">
<h1>🔍 MCP Browser Tools - Monitor de Erros</h1>
<p>Visualize os erros capturados do browser em tempo real</p>
<p><strong>Endpoint:</strong> POST http://localhost:3001/errors</p>
</div>
<div id="logs">
<h2>📊 Logs de Erros</h2>
<p>Os logs aparecerão aqui quando erros forem capturados...</p>
</div>
<script>
// Auto-refresh para mostrar logs em tempo real
setInterval(() => {
fetch("/logs/")
.then(response => response.text())
.then(data => {
document.getElementById("logs").innerHTML = data;
})
.catch(err => console.log("Erro ao carregar logs:", err));
}, 2000);
</script>
</body>
</html>';
add_header Content-Type text/html;
}
# Servir arquivos de log
location /logs/ {
alias /usr/share/nginx/html/logs/;
autoindex on;
autoindex_format json;
}
}
}