- Introduced a new script `make-blog-cover.mjs` to create a default cover image for blog posts.
- The image is generated in PNG format with dimensions 1200x630, suitable for Open Graph.
- Utilizes the site's branding colors and logo from `public/nobat724.svg`.
- Includes custom font styling using the Vazirmatn font.
- The generated image is saved to `public/assets/images/blog-default-cover.png`.
- Added isomorphic-dompurify for improved XSS protection
- Refactored token storage to use in-memory management for access tokens
- Implemented server-side route handlers for OAuth token management
- Introduced security headers in next.config.js
- Removed client-side exposure of client_secret and sensitive tokens
- Updated API interceptors to handle token refresh logic
- Cleaned up cookie management for refresh tokens
backend جدید clinicpro جریان سهمرحلهای دارد:
send-code → verify-code (uuid+code) → oauth/token (uuid).
- token route حالا اول /api/v1/user/verify-code را صدا میزند سپس
/oauth/token با بدنه JSON {grant_type, uuid} (بهجای form-urlencoded
با client_id/secret/scope که فقط backend پروداکشن قدیم میپذیرفت)
- refresh route به مسیر درست /oauth/token/refresh با بدنه JSON
- تست E2E روی ddev محلی: access_token واقعی صادر شد
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
route های token و refresh از fetch بومی Node استفاده میکردند که گواهی
self-signed ddev محلی را رد میکرد و خطای 500 میداد. حالا از axiosInstance
استفاده میکنند و خطای واقعی backend را با status درست برمیگردانند.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Fix GPS map links always sending literal "latitude"/"longitude" strings
instead of actual coordinates in openLocation/Content.js
- Add api.clinic-pro.ir to next.config.js remotePatterns so production
images load correctly
- Fix appointment page: await params and getStateInfo (Next.js 15 pattern)
- Enable 401 handling in api.js: clear cookies and redirect to /login
- Move OAuth client_secret to server-side API routes (/api/auth/token,
/api/auth/refresh) so it is never bundled into client-side JavaScript
- Update SendReq, SubmitData, ButtonSendData to call API routes instead
of directly sending client_secret from the browser
- Update docker-compose.yml to use server-only CLIENT_SECRET env var
- Remove debug console.log from clinic doctors list component
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>