Skip to content

Commit 19f3abc

Browse files
antiseptikkjaviereguiluz
authored andcommitted
How to use dev-server with serf-signed domain.
1 parent 3243cb8 commit 19f3abc

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
@@ -58,6 +58,21 @@ option:
5858
5959
$ ./node_modules/.bin/encore dev-server --hot
6060
61+
If you want to use SSL with self-signed domain, add
62+
the ``--https``, ``--pfx=``, and ``--allowed-hosts``
63+
options to the ``dev-server`` command in the ``package.json`` file:
64+
65+
.. code-block:: diff
66+
67+
{
68+
...
69+
"scripts": {
70+
- "dev-server": "encore dev-server",
71+
+ "dev-server": "encore dev-server --https --pfx=$HOME/.symfony/certs/default.p12 --allowed-hosts=mydomain.wip",
72+
...
73+
}
74+
}
75+
6176
If you experience issues related to CORS (Cross Origin Resource Sharing), add
6277
the ``--disable-host-check`` and ``--port`` options to the ``dev-server``
6378
command in the ``package.json`` file:
@@ -78,6 +93,7 @@ command in the ``package.json`` file:
7893
Beware that `it's not recommended to disable host checking`_ in general, but
7994
here it's required to solve the CORS issue.
8095

96+
8197
.. _`webpack-dev-server`: https://webpack.js.org/configuration/dev-server/
8298
.. _`HMR`: https://webpack.js.org/concepts/hot-module-replacement/
8399
.. _`it's not recommended to disable host checking`: https://webpack.js.org/configuration/dev-server/#devserverdisablehostcheck

0 commit comments

Comments
 (0)