• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How to allow CORS request from Javascript

New Here ,
Dec 08, 2016 Dec 08, 2016

Copy link to clipboard

Copied

I have a html page, calling HLS from javascript. Getting CORS error, of header "allow-control-allow-origin". I am using Adobe Media Server 4.5.

How can i allow CORS request from javascript?

Views

3.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Mar 22, 2017 Mar 22, 2017

This question seems very relevant to the forum, since it is about enabling CORS requests from HTML/Javascript to load HLS provided by AMS.

I found the answer here: How to allow CORS request from Javascript in Adobe Media Server - Stack Overflow

Header set Access-Control-Allow-Origin "your_page_origin"

I added at line 207 near where other Headers are being set, restarted AMS/Apache and it worked for me. You do have to put in either * as a wildcard for your_page_origin, or your whole domain, like http://localhost:4200

Votes

Translate

Translate
Adobe Employee ,
Jan 09, 2017 Jan 09, 2017

Copy link to clipboard

Copied

IMHO, this question should be posted on another forum page..This is adobe media server forums page.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Mar 22, 2017 Mar 22, 2017

Copy link to clipboard

Copied

LATEST

This question seems very relevant to the forum, since it is about enabling CORS requests from HTML/Javascript to load HLS provided by AMS.

I found the answer here: How to allow CORS request from Javascript in Adobe Media Server - Stack Overflow

Header set Access-Control-Allow-Origin "your_page_origin"

I added at line 207 near where other Headers are being set, restarted AMS/Apache and it worked for me. You do have to put in either * as a wildcard for your_page_origin, or your whole domain, like http://localhost:4200

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines