Closed ejnshtein closed 12 months ago
CMA incorrectly sets fastcgi_params for external connections when CMA is set with a custom "host" which is accessible through the web. It can incorrectly load HTTP content to HTTPS pages
Should work
After ngrok changed domain, doesn't work
const dns = require('dns') const { networkInterfaces } = require('os') const ipRangeCheck = require('ip-range-check') const ranges = networkInterfaces() const values = Object.values(ranges).flatMap((v) => v) const families = { 4: 'IPv4', 6: 'IPv6' } dns.promises .lookup('localhost') .then(({ address, family }) => { const filteredValues = values.filter( (v) => v.family === families[family] ) console.log( ipRangeCheck( address, filteredValues.map((f) => f.cidr) ) ) }) .catch(console.log)
Describe the bug
CMA incorrectly sets fastcgi_params for external connections when CMA is set with a custom "host" which is accessible through the web.
It can incorrectly load HTTP content to HTTPS pages
Expected behaviour
Should work
Actual behaviour
After ngrok changed domain, doesn't work
Usefull code