Forum

Multiple CORS domains

Pepijn 2015-12-13 17:10:04 UTC in Nimble Streamer

I switched from nginx-rtmp to Nimble yesterday and I really like it, but I got one problem;

I got multiple domains accessing the playlist.m3u8
- https://cast.mydomain.tv/
- https://www.mydomain.tv/
- https://cdn.mydomain.tv/

My Nimble server must return the Access-Control-Allow-Origin CORS header.
I know I can set the header to one domain or to a wildcard but a wildcard isn't very safe and one domain isn't enough for me.

I used to check the origin and set the header to the origin if the origin was in an array of allowed domains.
It's explained here: http://www.w3.org/TR/cors/#resource-implementation - 6.4 Implementation Considerations

Is it possible to do this with Nimble Streamer?

Yury Udovichenko 2015-12-14 00:09:00 UTC 

Hello,

Please read this article regarding the CORS setup in Nimble Streamer: http://blog.wmspanel.com/2014/12/cross-domain-policy-access-control-nimble.html
It may cover the case which you described.

Also, please take a look at our paywall feature set, you may find it useful as well: https://wmspanel.com/paywall

Thank you.

Pepijn 2015-12-14 10:13:44 UTC 

Thank you for the answer.

I have already seen that but it doesn't seem possible to define multiple domains.

I'm already using hotlink protection but I'd like to make it more secure.

Thank you,
Pepijn

Max 2015-12-14 13:58:30 UTC 

Hello,

It is not possible to do it right now, but we'll consider implementing it in the future. Could you please clarify, how did you use it with nginx-rtmp, did you use several locations with different Access-Control-Allow-Origin headers?

Thank you.

Pepijn 2015-12-14 19:44:51 UTC 

Hello,

Nginx-rtmp created the HLS files and they were served through a PHP server.

The PHP server checked the origin and set the Access-Control-Allow-Origin header to the origin if the origin was in an array of allowed domains.

Can I have your mail to send you the PHP class?

Thank you for the help.

Pepijn 2015-12-14 19:44:51 UTC 

Hello,

Nginx-rtmp created the HLS files and they were served through a PHP server.

The PHP server checked the origin and set the Access-Control-Allow-Origin header to the origin if the origin was in an array of allowed domains.

Can I have your mail to send you the PHP class?

Thank you for the help.

Max 2015-12-14 20:15:37 UTC 

Hi,

OK, this means you had some custom script allowing to generate response headers, it was not just a list of pre-configured domains.
Please send PHP script to info@nimblestreamer.com.

Thank you.

Post a reply


Post a new question

Categories:

Tags:

nimbleNimble StreamerFAQHLSDVRRTMPnimble streamerhlsABRcachewmsauthNimbleAPItranscoderffmpegdvrapiVODfailoverrtmpstreamingDASHwmspanelvodudprtsppaywallsubtitlesDispersaRTSPyoutubelivelivestreamingmp4MPEG-DASHWMSAuthpay-per-viewgeosldpdashvideostreameredgeabrWindowsencryptionhttpsUDPwhite labelconfigsmiluser agentFFMPEGmulticastSRTsslaudioMPEG-TSre-streamingmpeg-dashchunksraspberry piCORSandroidsrtbandwidthadvertizercorsvlcS3WMSPanelDRMrules.confadvertisingipv6MPEGTSFastSpringRAMwms panelthumbnailFMLEVATcrossdomainupdateRecordingmpegtsplaylistSMILwowzaakamaiaespushserversm3u8TranscodeSSLerrorbalanceplaylist_dvrWowzachromecastconfigurationIDreportingbugdomainnimblestreamerperformanceIPloopHttpsVidillionchunkmobilerepublishingawsAWSdownloadorigincloudfrontpublish controlcodecmpeg-tsCDNraspiannimble webcam html5UIroutesbitrateRegistration Issuedirect link32-bit Windowstwitchanalysecache_controlitworkmelive abr support mpeg-dashwmspanelapirtmp abrbeirutWWDCdubaideep statshls to multicast udplogcloudIIS Smooth StreamingmediaHot-linking protectionHTTPSAbrHDSvaddioalertsAuthentication in HLSCentOS v6.4jwplayer websitepricebaselinewhmcslimitOld logsscreencastnginx rtmp nimbleAV BridgeVaddioattaching domainsPI3 Ubuntuview timeWMSCONFIG_HOMEmessagerestreamcostinterfacesDVRRecordingloadbalancingmod_rewritemetadataprofilehls restreamingID3 tagsgbpsAxisVLCwmsauthsignhighhds streamresumeniblerlocalciscodecodertransocding republishingVideo Player.net hotlinkAliaslost trafficgentoo install server nimblePublic Iptranscoding using NvidiaPaywall AuthlocationlebanonmanifestofflinedocumentationipMP4 not playedspaceTrancoderconcurrent-connectionsicecast urlfileruleseekinghot linkingchangeamfServer-sideplayoutPlayReadyamazon web servicelimuxtasks-controldvr stream twicestoppedmainhot-linkAXVVGondata slicesaliasblocknvencconnectivitydvr streamunique visitorHLS vodpay per viewpaywalapplicationanalytics7brandingtrialMP4microsoft streamdvr_archivesmpeg dasherrorsobsTCOlog traffic statsrocksoftopenssldebianExpression Encoderprogressive downloadABR DASHlive video on demandFFmpegmultiple originsnimblesessionidbandwithHLS PlayerheaderDASH Playerserverlog nimble analysertmp playbackvideojssourceSnapshotsadaptiveAV1 codecNGINX-RTMPJWPLAYERPullvideo stopprivate networkLarge DVR filescrossdomain more then 1 domain4Kno WMSPanelsoundHLS Meta Tag editing.streamslive videoattachmentmac osx installvod no soundconcurrent connectionwotermarkhelp errorvimeoAWS 3buttload balanceFairplayfallbackamazonControl APIRemote StorageWowza AgentLive streamingTranscodervsomcdnnot foundsecuritylive streampullAS3Widevinempeg2tsServer-Side-Task-Controltwitch larix broadcaster androidDVRSettingsinstall players setup ready to goDelete recordsAppledisk migrationicecastscreen capturestereo to monodrmvideo loopresourceaes encryptionsubscriptionstarttime duration seekpointrebootmonitordvr streamsABR HLS Bitrateslive pull settingsnimble.confrtmp republishing transcodeIIS Media Servicsautomationnimble streamer web server php script pageNimble Streamer APIlivestreamrtmp for YouTubeapi accessDeep statsinterleavingweb playerABR DVR problemNimble CapacityoutrateLive Switcherscreen freezecan't registercontent-dispositionactionscript 3Live Broadcastnot to stealnimble streamer vod hls transmuxinglogginglearnerCross DomainNimble Serverinsert logoRTMP republishPIDAVCaptureMovieFileOutputblock downloadbroadcasterOSXPost processingadd_chunk failedfake extensionMPEG DASHUbuntu artful 17.10Transcoder MPEG DASHtranscodingFFMPEG;RTMP;I/O errorstatus:errornimble on cloudprerollHotlinking ProtectionStreaming routepremium featureThumbnailsserver incorrect timelarix broadcasterMPEG-DashLiveLIVEHow to do live stream with multiple audio trackpaymentProgressivenimble aliasesstatsrmtpno internetreloadSecuredemandreportsraspberryavoid refreshAndroiduser_agentdvr on wmspanelVideo cant be playedS3 AWSBroadcastLarixprogressivelivestream bitratecredentialsHLS Streamingthumbnail dvr-thumbnailLoad-Balancingnimble streamer mpeg-ts multiple inputswmsAuthSignPORTDVR Settingvbv-maxratetranscodeRepublishinglatencyadjustdelaympeg4buildPacketizingABR bitratestranscoder nimbleubuntu 18Teradek DecoderSLDPVR-360Failoverabr fallbackNimble connections.movalias routestoragedistributionspeedup my videoiOSgoogle cloud storagepricingissuecpucloudflareUsers limitoutputVOD HLS streaming on public IPdomain lockcontentRTMP RepublishCSSanalisyssctevideo.jsitworkscdnqatartransocderlivestreaminrtsp push androidartifactscache expiryvideo streamingQuickTimepublish streamtraffichd25AArch64incoming streamno soundInvalid frame headerstorage space availabledisk3.6.1-1mp2 audiofastspringwebhookdvr to livedissapointmentpay-per-minuteSO_RCVBUFbuffering videoadvp9nimble dvrdurationBandwidthgpuav1 codecNimbleStreamerPaywallvideo and audio not matchDVRStreamsaws amazonrulesError when installingFallbackhelprestartIOSViewer StatsNDIDVR Setting limitssaibufferGopHTML5 playerMPEG2 Videologo in streamUDP MulticastMax connectiona recordwirecasthttp serverSSL requestserver ip21

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the Privacy Policy. If you want to know more or withdraw your consent to all or some of the cookies, please refer to the Privacy Policy.
By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to the use of cookies.