ant-media/Ant-Media-Server

Can't login to console!

sjauld opened this issue · 8 comments

Issue

Short description

Brief description of what happened

I have an Ant Media Server cluster with a MongoDB backend that was working nicely on v1.6.1. After upgrading to v1.7.2, I can't log in anymore (403 error).

Environment

  • Operating system and version: AMS Enterprise v1.7.2 AMI
  • Java version: AMS Enterprise v1.7.2 AMI
  • Ant Media Server version: AMS Enterprise v1.7.2 AMI
  • Browser name and version: AMS Enterprise v1.7.2 AMI

Expected behavior

Put as much detail here as possible
I can log in

Actual behavior

Put as much detail here as possible
I can't log in

Steps to reproduce

  1. Deploy a working cluster using AMS v1.6.1 with a MongoDB backend
  2. Set an admin password
  3. Upgrade the cluster to v1.7.2
  4. Try to log in

Logs

Place logs on pastebin or elsewhere and put links here

Join Google Group and be a part of Ant Media Server Community.

mekya commented

Hi @mekya,

Yes, we haven't changed this, we're running all of the same userdata, just on the new AMI.

Cheers,
Stuart

mekya commented

I'll sent them via email now!

mekya commented
mekya commented
mekya commented

This issues for CORS related and it's fixed in 1.8.0

In order to make it work for https in 1.7.2, you should open the file /usr/local/antmedia/webapps/root/WEB-INF/web.xml
and replace the lines below

<filter>
        <filter-name>CorsFilter</filter-name>
        <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
        <init-param>
          <param-name>cors.allowed.origins</param-name>
          <param-value>http://localhost:4200</param-value>
        </init-param>
        <init-param>
          <param-name>cors.support.credentials</param-name>
          <param-value>true</param-value>
        </init-param>
    </filter>

with these ones

<filter>
        <filter-name>CorsFilter</filter-name>
        <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
        <init-param>
          <param-name>cors.allowed.origins</param-name>
          <param-value>*</param-value>
        </init-param>
    </filter>

restart the servers