From 88b4a70dc2c3cd498f7bd69c1511eb9232cda1e8 Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 10 May 2025 10:53:28 +0300 Subject: [PATCH] Update asset_mapper.rst Adds tip about configuration proxy when connection to jsDelivr is failed --- frontend/asset_mapper.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/frontend/asset_mapper.rst b/frontend/asset_mapper.rst index 061c4598bfa..a3c4eda2d84 100644 --- a/frontend/asset_mapper.rst +++ b/frontend/asset_mapper.rst @@ -225,6 +225,25 @@ This adds the ``bootstrap`` package to your ``importmap.php`` file:: `package.json configuration file`_. Try to contact the package maintainer to ask them to fix those issues. +.. tip:: + + If you get a error like as ``Connection was reset for "https://cdn.jsdelivr.net/npm/...".``, + than you can temporaly configure the proxy for connection to the ``jsDelivr`` CDN: + + .. code-block:: yaml + + # config/packages/framework.yaml + framework: + # ... + http_client: + default_options: + proxy: '185.250.180.238:8080' + # If you use CURL, add extra options: + extra: + curl: + # 61 is value of constant CURLOPT_HTTPPROXYTUNNEL + '61': true + Now you can import the ``bootstrap`` package like usual: .. code-block:: javascript