You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requests from the WebUI to the backend are made to the IP address of the backend, rather than the initiating hostname.
This is typically considered a design flaw for several reasons:
Flexibility and Portability: Exposing an IP address ties the front end to a specific backend instance, making it difficult to scale, deploy across different environments, or reroute traffic in case of a change in the backend infrastructure. Using a domain name allows DNS to handle redirection if the backend moves to a different IP or if multiple instances are deployed.
Security and Configuration Management: IP-based queries bypass the usual CORS (Cross-Origin Resource Sharing) configurations set up on the domain, which can introduce security vulnerabilities. It also complicates configuration management since IPs might change over time due to network changes, autoscaling, or infrastructure updates.
Environment Consistency: In development, staging, and production environments, URLs are usually configured differently. Hardcoding an IP address in the UI introduces inconsistencies across these environments and makes it more challenging to replicate the production environment for testing.
Service Discovery: For larger systems or containerized environments (e.g., Docker, Kubernetes), service discovery mechanisms often manage the routing of traffic. IP-based routing bypasses these, which could prevent the system from leveraging built-in load balancing and service monitoring.
Expected behavior
Requests to the backend should automatically use the same hostname or domain as the WebUI request (e.g., if accessing the WebUI at hostname.com:3000, backend requests should go to hostname.com:8080). This will ensure consistency and allow DNS to handle any necessary routing changes.
Problem
Requests from the WebUI to the backend are made to the IP address of the backend, rather than the initiating hostname.
This is typically considered a design flaw for several reasons:
Flexibility and Portability: Exposing an IP address ties the front end to a specific backend instance, making it difficult to scale, deploy across different environments, or reroute traffic in case of a change in the backend infrastructure. Using a domain name allows DNS to handle redirection if the backend moves to a different IP or if multiple instances are deployed.
Security and Configuration Management: IP-based queries bypass the usual CORS (Cross-Origin Resource Sharing) configurations set up on the domain, which can introduce security vulnerabilities. It also complicates configuration management since IPs might change over time due to network changes, autoscaling, or infrastructure updates.
Environment Consistency: In development, staging, and production environments, URLs are usually configured differently. Hardcoding an IP address in the UI introduces inconsistencies across these environments and makes it more challenging to replicate the production environment for testing.
Service Discovery: For larger systems or containerized environments (e.g., Docker, Kubernetes), service discovery mechanisms often manage the routing of traffic. IP-based routing bypasses these, which could prevent the system from leveraging built-in load balancing and service monitoring.
Expected behavior
Requests to the backend should automatically use the same hostname or domain as the WebUI request (e.g., if accessing the WebUI at
hostname.com:3000
, backend requests should go tohostname.com:8080
). This will ensure consistency and allow DNS to handle any necessary routing changes.How to reproduce
Deployment information
Docker version 27.3.1, build ce12230
Ubuntu 24.04.1 LTS
Additional information
No response
The text was updated successfully, but these errors were encountered: