I'm trying to serve protected audio content [mp3] via a NR http endpoint:
ie: http in:
I tried to many failed attempts to getting it to work.
HTTP IN -> Read File Node (non public mp3) -> HTTP Response
The Read File node I've tried to set as binary, and multi-part buffer... but can't seem to get these to work.
I've tried to set various headers in the
HTTP Response node:
Content-Type : audio/mpeg
Transfer-Encoding : chunked
Content-Disposition : inline
and client side:
<audio controls> <source src="https://xyz.com:1880/audio/foo" type="audio/mpeg"> Your browser does not support the audio element. </audio>
The mp3 is fairly lengthy, so chunking the data out is ideal.
I get a blank player with 0:00 length.
I've also tried to set the
Content-Length to the byte count of the mp3 file being served.
Still no go.
I can easily access the file in public folders, but this defeats the purpose of protecting the content to allow access to authorized users only.
What am I missing?