thereido / RatingSync

Keep ratings from movie websites in sync
GNU General Public License v3.0
0 stars 1 forks source link

Replace variable RS_HOST with 2 URLs: external & internal urls #67

Open thereido opened 3 hours ago

thereido commented 3 hours ago

Clients (like browsers) use a URL to reach the app/website. The PHP server sometimes needs to reach the API (like images) for internal requests. Depending on how the app is deployed, in some cases that use different URLs.

DomainConstants.php can replace RS_HOST with these:

# Used by users for the app
APP_URL = https://some-domain.com (prod), http://localhost (dev)

# Used by the RatingSync PHP server. In a Docker deployment it might not be reach the APP_URL.
# In that case use the RatingSync web server's Docker container name.
INTERNAL_API_URL =  APP_URL
#INTERNAL_API_URL = http://rs-web-container