add CORS to AzuraCast droplet

Hi, can I somehow add CORS to my Azura Cast Radio app? like that: Access-Control-Allow-Origin: *,

I found that function in the radio itself, but unfortunatly it didnt solved my problem that a website doesnt allow this radio anymore…

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
December 11, 2022

Hi there,

I don’t think that there is a good way to do that at the moment, as if you ever need to upgrade your instance using the self-update script that AzureCast provides at /var/azuracast/ all of your changes will be lost.

What I could suggest is requesting this as a feature, so that some of those Nginx changes could be configurable via the docker-compose yaml file for example.

As the image itself is supported by AzureCast, what you could do is post this as a feature request on the official repo here:

Alternatively, if you still want to make the change, you might be able to change the Nginx config directly:

  • Get the container ID:
docker ps -a | awk '{print $1}'
  • Access the container:
docker exec -i -t CONTAINER_ID bash
  • And then update the Nginx config at /etc/nginx/sites-available/default and add add_header Access-Control-Allow-Origin "*"; within the server { .. } block.

After that you would need to restart the container as well.

I would recommend taking a backup before making those changes!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.