mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-10 15:04:52 +03:00
Update browsersync proxy request callback to use dynamic host
This commit is contained in:
parent
7e96773d6e
commit
b6ad5715ec
|
@ -134,9 +134,9 @@ function initBrowserSync() {
|
||||||
proxy: {
|
proxy: {
|
||||||
target: 'django:8000',
|
target: 'django:8000',
|
||||||
proxyReq: [
|
proxyReq: [
|
||||||
function(proxyReq) {
|
function(proxyReq, req) {
|
||||||
// Set to the browsersync host & port to have email links working
|
// Assign proxy "host" header same as current request at Browsersync server
|
||||||
proxyReq.setHeader('Host', 'localhost:3000')
|
proxyReq.setHeader('Host', req.headers.host)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user