8000 How to use dev-server with serf-signed domain. by antiseptikk · Pull Request #13814 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

How to use dev-server with serf-signed domain. #13814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions frontend/encore/dev-server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,21 @@ option:

$ ./node_modules/.bin/encore dev-server --hot

If you want to use SSL with self-signed domain, add
the ``--https``, ``--pfx=``, and ``--allowed-hosts``
options to the ``dev-server`` command in the ``package.json`` file:

.. code-block:: diff

{
...
"scripts": {
- "dev-server": "encore dev-server",
+ "dev-server": "encore dev-server --https --pfx=$HOME/.symfony/certs/default.p12 --allowed-hosts=mydomain.wip",
...
}
}

If you experience issues related to CORS (Cross Origin Resource Sharing), add
the ``--disable-host-check`` and ``--port`` options to the ``dev-server``
command in the ``package.json`` file:
Expand All @@ -78,6 +93,7 @@ command in the ``package.json`` file:
Beware that `it's not recommended to disable host checking`_ in general, but
here it's required to solve the CORS issue.


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