Files
2025-09-14 13:07:54 +05:00

96 lines
3.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="width=device-width, initial-scale=1.0" />
<title>Parser Service</title>
<style>
body {
font-family: Arial, sans-serif;
max-width: 800px;
margin: 0 auto;
padding: 20px;
background-color: #f0f8ff;
}
.container {
background: white;
padding: 30px;
border-radius: 10px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
h1 {
color: #1e3a8a;
text-align: center;
}
.info {
background: #eff6ff;
padding: 15px;
border-radius: 5px;
margin: 20px 0;
}
.endpoint {
background: #f8f9fa;
padding: 10px;
border-left: 4px solid #3b82f6;
margin: 10px 0;
}
.note {
background: #fef3c7;
padding: 15px;
border-radius: 5px;
margin: 20px 0;
border-left: 4px solid #f59e0b;
}
</style>
</head>
<body>
<div class="container">
<h1>🔍 Parser Service</h1>
<div class="info">
<p><strong>Статус:</strong> Работает</p>
<p><strong>Порт:</strong> 8080</p>
<p><strong>Описание:</strong> Сервис для парсинга данных</p>
</div>
<div class="note">
<strong>⚠️ Важно:</strong> Этот сервис доступен только через API Gateway
по пути <code>/api/parser/**</code>
</div>
<h2>Доступные эндпоинты:</h2>
<div class="endpoint">
<strong>GET /</strong> - Главная страница (текущая)
</div>
<div class="endpoint">
<strong>GET /api/parser/items</strong> - Список элементов для парсинга
</div>
<div class="endpoint">
<strong>POST /api/parser/parse</strong> - Запуск парсинга
</div>
<div class="endpoint">
<strong>GET /api/parser/status</strong> - Статус парсинга
</div>
<h2>Тестирование через API Gateway:</h2>
<p>
Попробуйте обратиться к этим эндпоинтам через API Gateway на порту 80:
</p>
<ul>
<li><code>http://localhost/api/parser/</code></li>
<li><code>http://localhost/api/parser/items</code></li>
<li><code>http://localhost/api/parser/parse</code></li>
<li><code>http://localhost/api/parser/status</code></li>
</ul>
<h2>Как это работает:</h2>
<ol>
<li>API Gateway получает запрос на <code>/api/parser/...</code></li>
<li>Срабатывает маршрут с высоким приоритетом (order: 1)</li>
<li>Запрос перенаправляется на <code>parser-service:8080</code></li>
<li>Префикс <code>/api/parser</code> удаляется (StripPrefix=2)</li>
<li>Parser Service обрабатывает запрос</li>
</ol>
</div>
</body>
</html>