diff --git a/docs/fassets/guides/1-deploy-fassets-agent.mdx b/docs/fassets/guides/1-deploy-fassets-agent.mdx index ff26a572..34481e48 100644 --- a/docs/fassets/guides/1-deploy-fassets-agent.mdx +++ b/docs/fassets/guides/1-deploy-fassets-agent.mdx @@ -179,9 +179,26 @@ You can obtain the `xrp_rpc` for the XRP Ledger, `btc_rpc` for Bitcoin, and `dog ## Configure the Server -:::danger +To access the FAssets admin interface, you need to configure the server to route requests to the frontend and backend. -When configuring the NGINX server for FAssets, ensure all **security measures** are implemented to safeguard your system. Exposing the FAssets backend can lead to severe vulnerabilities. +### Backend Configuration + +Allow your server to access the URL `fasset-backend`: + +1. Route requests from `/fasset-backend` to the backend service (default port `4000`). +2. Rewrite the path from `/fasset-backend/` to `/api/`. +3. Forward necessary headers to the backend for proper communication. + +### Frontend Configuration + +Route requests from the frontend to the backend service: + +1. Route requests from `/` path to the frontend service running on the desired port (default port `3000`). +2. Forward the Host header to the frontend service for proper handling. + +:::warning + +When configuring the server for FAssets, ensure all **security measures** are implemented to safeguard your system. Exposing the FAssets backend can lead to severe vulnerabilities. - **Never expose the FAssets agent interface (`/fasset-backend`) to the public network**. - As a rule of thumb, restrict access to the backend **only** within the local network. @@ -190,21 +207,6 @@ When configuring the NGINX server for FAssets, ensure all **security measures** ::: -Set up the FAssets backend and frontend access by configuring the NGINX server. - -```plaintext -location /fasset-backend { # use BACKEND_URL - rewrite /fasset-backend/(.*) /api/$1 break; - proxy_set_header Host $http_host; - proxy_pass http://localhost:4000; # use BACKEND_PORT -} - -location / { # use FRONTEND_URL - proxy_set_header Host $http_host; - proxy_pass http://localhost:3000; # use FRONTEND_PORT -} -``` - ## Start the FAssets Agent Start the FAssets agent using the Docker infrastructure by running the following command: