You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/03/14 14:39:46 UTC
[GitHub] [couchdb-fauxton] Antonio-Maranhao commented on a change in pull request #1344: upgrade webpack and associated packages
Antonio-Maranhao commented on a change in pull request #1344:
URL: https://github.com/apache/couchdb-fauxton/pull/1344#discussion_r826015694
##########
File path: devserver.js
##########
@@ -83,43 +83,55 @@ const runWebpackServer = function () {
});
const options = {
- contentBase: path.join(__dirname, '/dist/debug/'),
- host: 'localhost',
+ static: {
+ directory: path.join(__dirname, '/dist/debug/')
+ },
+ host: '0.0.0.0',
port: process.env.FAUXTON_PORT || 8000,
- overlay: true,
+ client: {
+ overlay: true,
+ },
hot: false,
historyApiFallback: false,
- disableHostCheck: true,
- stats: {
- colors: true,
+ allowedHosts: "all",
+ devMiddleware: {
+ stats: {
+ colors: true,
+ },
},
headers: getCspHeaders(),
- before: (app) => {
- app.all('*', (req, res, next) => {
- const accept = req.headers.accept ? req.headers.accept.split(',') : '';
- if (/application\/json/.test(accept[0]) || /multipart\/form-data/.test(accept[0])) {
- proxy.web(req, res);
- return;
+ setupMiddlewares: (middlewares, devServer) => {
+ if (!devServer) {
+ throw new Error('webpack-dev-server is not defined');
+ }
+
+ middlewares.unshift(
+ {
+ name: "test-proxy",
Review comment:
```suggestion
name: "proxy-to-couchdb",
```
##########
File path: devserver.js
##########
@@ -83,43 +83,55 @@ const runWebpackServer = function () {
});
const options = {
- contentBase: path.join(__dirname, '/dist/debug/'),
- host: 'localhost',
+ static: {
+ directory: path.join(__dirname, '/dist/debug/')
+ },
+ host: '0.0.0.0',
port: process.env.FAUXTON_PORT || 8000,
- overlay: true,
+ client: {
+ overlay: true,
+ },
hot: false,
historyApiFallback: false,
- disableHostCheck: true,
- stats: {
- colors: true,
+ allowedHosts: "all",
Review comment:
Change to `auto` as `all` could open the dev server to external attacks.
##########
File path: readme.md
##########
@@ -1,7 +1,7 @@
[](https://travis-ci.org/apache/couchdb-fauxton)
# Fauxton
-
+q
Review comment:
Please remove
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org