Skip to content

Commit c3e2311

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: How to use dev-server with serf-signed domain.
2 parents b14da16 + 1049771 commit c3e2311

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

frontend/encore/dev-server.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,21 @@ option:
7676
7777
$ ./node_modules/.bin/encore dev-server --hot
7878
79+
If you want to use SSL with self-signed certificates, add the ``--https``,
80+
``--pfx=``, and ``--allowed-hosts`` options to the ``dev-server`` command in
81+
the ``package.json`` file:
82+
83+
.. code-block:: diff
84+
85+
{
86+
...
87+
"scripts": {
88+
- "dev-server": "encore dev-server",
89+
+ "dev-server": "encore dev-server --https --pfx=$HOME/.symfony/certs/default.p12 --allowed-hosts=mydomain.wip",
90+
...
91+
}
92+
}
93+
7994
If you experience issues related to CORS (Cross Origin Resource Sharing), add
8095
the ``--disable-host-check`` and ``--port`` options to the ``dev-server``
8196
command in the ``package.json`` file:
@@ -96,6 +111,7 @@ command in the ``package.json`` file:
96111
Beware that `it's not recommended to disable host checking`_ in general, but
97112
here it's required to solve the CORS issue.
98113

114+
99115
.. _`webpack-dev-server`: https://webpack.js.org/configuration/dev-server/
100116
.. _`HMR`: https://webpack.js.org/concepts/hot-module-replacement/
101117
.. _`it's not recommended to disable host checking`: https://webpack.js.org/configuration/dev-server/#devserverdisablehostcheck

0 commit comments

Comments
 (0)