Advertisement
Guest User

Untitled

a guest
Apr 30th, 2025
6
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. routers:
  2. # HTTP to HTTPS redirect router
  3. main-app-router-redirect:
  4. rule: "Host(`pangolin.yourdomain.com`)"
  5. service: next-service
  6. entryPoints:
  7. - web
  8. middlewares:
  9. - redirect-to-https
  10.  
  11. # Next.js router (handles everything except API and WebSocket paths)
  12. next-router:
  13. rule: "Host(`pangolin.yourdomain.com`) && !PathPrefix(`/api/v1`)"
  14. service: next-service
  15. entryPoints:
  16. - websecure
  17. tls: {}
  18.  
  19. # API router (handles /api/v1 paths)
  20. api-router:
  21. rule: "Host(`pangolin.yourdomain.com`) && PathPrefix(`/api/v1`)"
  22. service: api-service
  23. entryPoints:
  24. - websecure
  25. tls: {}
  26.  
  27. # WebSocket router
  28. ws-router:
  29. rule: "Host(`pangolin.yourdomain.com`)"
  30. service: api-service
  31. entryPoints:
  32. - websecure
  33. tls: {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement