()
| 6531 | |
| 6532 | describe('socketPath security', () => { |
| 6533 | function makeSocketPath() { |
| 6534 | const pipe = `axios-socketpath-${process.pid}-${Date.now()}-${Math.random().toString(36).slice(2)}`; |
| 6535 | |
| 6536 | return os.platform() === 'win32' |
| 6537 | ? `\\\\.\\pipe\\${pipe}` |
| 6538 | : path.join(os.tmpdir(), `${pipe}.sock`); |
| 6539 | } |
| 6540 | |
| 6541 | function startUnixServer(socketPath, onRequest) { |
| 6542 | return new Promise((resolveStart, rejectStart) => { |