Skip to content

Commit a634400

Browse files
authored
fix(cli-service): restrict request headers of historyApiFallback in WebpackDevServer (#6162)
1 parent 5830171 commit a634400

File tree

1 file changed

+4
-0
lines changed
  • packages/@vue/cli-service/lib/commands

1 file changed

+4
-0
lines changed

packages/@vue/cli-service/lib/commands/serve.js

+4
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ module.exports = (api, options) => {
175175
clientLogLevel: 'silent',
176176
historyApiFallback: {
177177
disableDotRule: true,
178+
htmlAcceptHeaders: [
179+
'text/html',
180+
'application/xhtml+xml'
181+
],
178182
rewrites: genHistoryApiFallbackRewrites(options.publicPath, options.pages)
179183
},
180184
contentBase: api.resolve('public'),

0 commit comments

Comments
 (0)