Fix: футер SPA — ссылки Swagger UI/OpenAPI под префикс /pdf-converter/ #6
@@ -188,11 +188,11 @@ export default function App() {
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
<footer className="mx-auto max-w-[760px] px-5 pt-8 pb-12 text-sm text-muted">
|
<footer className="mx-auto max-w-[760px] px-5 pt-8 pb-12 text-sm text-muted">
|
||||||
<a href="/swagger-ui.html" className="underline-offset-2 hover:text-accent hover:underline">
|
<a href={`${import.meta.env.BASE_URL}swagger-ui.html`} className="underline-offset-2 hover:text-accent hover:underline">
|
||||||
Swagger UI
|
Swagger UI
|
||||||
</a>
|
</a>
|
||||||
{' · '}
|
{' · '}
|
||||||
<a href="/v3/api-docs" className="underline-offset-2 hover:text-accent hover:underline">
|
<a href={`${import.meta.env.BASE_URL}v3/api-docs`} className="underline-offset-2 hover:text-accent hover:underline">
|
||||||
OpenAPI
|
OpenAPI
|
||||||
</a>
|
</a>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@@ -9,9 +9,11 @@ export default defineConfig({
|
|||||||
base: process.env.VITE_BASE ?? '/',
|
base: process.env.VITE_BASE ?? '/',
|
||||||
plugins: [react(), tailwindcss()],
|
plugins: [react(), tailwindcss()],
|
||||||
server: {
|
server: {
|
||||||
// dev без CORS: запросы /api идут на бэкенд через прокси
|
// dev без CORS: запросы /api и документация (/swagger-ui*, /v3/api-docs*) идут на бэкенд через прокси
|
||||||
proxy: {
|
proxy: {
|
||||||
'/api': 'http://localhost:8080',
|
'/api': 'http://localhost:8080',
|
||||||
|
'/swagger-ui': 'http://localhost:8080',
|
||||||
|
'/v3/api-docs': 'http://localhost:8080',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user