Skip to content

Commit f1acc0b

Browse files
committed
minor #13814 How to use dev-server with serf-signed domain. (antiseptikk)
This PR was submitted for the 5.1 branch but it was merged into the 3.4 branch instead. Discussion ---------- How to use dev-server with serf-signed domain. Adding documentation for --allowed-hosts option to use dev-server with serf-signed domain Commits ------- 19f3abc How to use dev-server with serf-signed domain.
2 parents 3243cb8 + 19f3abc commit f1acc0b

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)