asp.net - Get referring domain from HTML5 Audio Tag Streaming URL -


part of site working on @ moment requires audio/video previews.

these server different server main site.

the streaming url of form:

www.myserver.com/preview.aspx?e=i_am_an_encrypted_key

the key generated server hosts file, not site on previews displayed. it's kind of api.

part of security stop these previews being played anywhere except website supposed check domain requesting this, seems httpcontext.current.request.urlreferrer null when requested html5 video/audio element.

without posting domain along key api, there way can referring url on receiving server, server side?

edit:

to clarify:

  • there website html5 elements directed url on different server, url , key provided server (not website)
  • when api server receives request stream preview checks key (which tells play) , checks referring domain against list of allowed domains.

figured out - in case cares...

simply replace:

referringdomain = httpcontext.current.request.urlreferrer

with :

referringdomain = httpcontext.current.request.headers("referer")

sorted! :)


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -