Three routing fixes, all in nginx.conf so they live in version control. Apex to www is now a 301. Traefik was answering 307 because Coolify generates `redirectregex.permanent=false` and hardcodes it, so pinning the label would be overwritten on the next deploy. Moving the redirect into the container means the app's `redirect` setting in Coolify must be `both`, otherwise Traefik still redirects the apex before nginx ever sees it. A temporary redirect consolidates nothing, and every canonical on the site pointed through it. Unknown paths now return 404 instead of 200 with the SPA shell. The app routes entirely through the hash (#/pricing, #/auth/callback), which never reaches the server, so nothing deep-links to a path and the fallback was load-bearing for nothing. Answering 200 with byte-identical markup for every made-up path made the site look like a single page duplicated infinitely. The 404 body is a branded page generated by the same renderer, marked noindex and kept out of both the sitemap and llms.txt. /gallery and /video/* now 301 to api.openshorts.app, which is where those server-rendered pages actually live. The README has linked them on the apex since they were written, and the apex quietly served the landing page instead. Verified against the production nginx config in a container: 15 real routes 200, 6 made-up paths 404, both gallery paths 301 to the API host, apex 301s to www preserving path and query. Coolify's health check for this app is disabled and would target /, which still returns 200. |
||
|---|---|---|
| .. | ||
| public | ||
| seo | ||
| src | ||
| .gitignore | ||
| Dockerfile | ||
| eslint.config.js | ||
| index.html | ||
| nginx.conf | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.js | ||
| vite-plugin-seo.js | ||
| vite.config.js | ||
React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel (or oxc when used in rolldown-vite) for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh
React Compiler
The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.
Expanding the ESLint configuration
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.