How to resolve " process_cors_request: Origin header 'http://localhost:8088' does not match an allowed origin."

console logs:
Connected to Asterisk 13.21.0 currently running on gopi-VirtualBox (pid = 1218)
[Jun 1 10:41:39] NOTICE[14604]: res_ari.c:769 process_cors_request: Origin header ‘http://localhost:8088’ does not match an allowed origin.
Creating Stasis app ‘channel-state’
== WebSocket connection from ‘127.0.0.1:47038’ for protocol ‘’ accepted using version ‘13’
Activating Stasis app ‘channel-state’
Deactivating Stasis app ‘channel-state’
Shutting down application ‘channel-state’
== WebSocket connection from ‘127.0.0.1:47038’ closed
Destroying Stasis app channel-state

my ari.conf flie content:

  1 [general]
  2 enabled = yes
  3 pretty = yes
  4 allowed_origins = *
  5 
  6 [asterisk]
  7 type = user
  8 read_only = no
  9 password = asterisk

Hi,

I am completely stuck with the above issue. Could you please some one help me to get out of this issue

Hi @jcolp, @david551

console logs:
Connected to Asterisk 13.21.0 currently running on gopi-VirtualBox (pid = 1218)
[Jun 1 10:41:39] NOTICE[14604]: res_ari.c:769 process_cors_request: Origin header ‘http://localhost:8088’ does not match an allowed origin.
Creating Stasis app ‘channel-state’
== WebSocket connection from ‘127.0.0.1:47038’ for protocol ‘’ accepted using version ‘13’
Activating Stasis app ‘channel-state’
Deactivating Stasis app ‘channel-state’
Shutting down application ‘channel-state’
== WebSocket connection from ‘127.0.0.1:47038’ closed
Destroying Stasis app channel-state

my ari.conf flie content:

  1 [general]
  2 enabled = yes
  3 pretty = yes
  4 allowed_origins = *
  5 
  6 [asterisk]
  7 type = user
  8 read_only = no
  9 password = asterisk

Could you please help me resolve this issue

I just tried this under Asterisk 13 and had no problems. If you try using https://ari.asterisk.org/ does it work?

Hi @jcolp

i don’t have an idea to use Swagger UI.

Could you please let me know how to use or refer related link

You use the correct URL for your Asterisk at the top, replacing localhost with the hostname. The API key is “username:password” combined. If you hit the “Explore” button and it loads properly then Asterisk is configured properly.

And on the Asterisk console? The CORS message again? What does “ari show status” show?

Connected to Asterisk 13.21.0 currently running on gopi-VirtualBox (pid = 1219)
[Jun 5 15:29:25] NOTICE[17820]: res_ari.c:768 process_cors_request: Entering to check allowed origin…
[Jun 5 15:29:25] NOTICE[17820]: res_ari.c:770 process_cors_request: Origin header ‘http://localhost:8088’ does not match an allowed origin.
gopi-VirtualBoxCLI> ari show status
ARI Status:
Enabled: Yes
Output format: pretty
Auth realm: Asterisk REST Interface
Allowed Origins: localhost:8088,http://ari.asterisk.org
User count: 1
gopi-VirtualBox
CLI>

Please try with ‘*’ for allowed origins initially. Once that is confirmed to be fine then modify it. As well even your current configuration doesn’t match that. You have “localhost:8088” and not “http:/localhost:8088”.

After changing ari.conf file as,
1 [general]
2 enabled = yes
3 pretty = yes
4 allowed_origins = *
5
6 [asterisk]
7 type = user
8 read_only = no
9 password = asterisk
i restarted asterisk with “service astersik restart” and “astrersik -r”. Even after allowed origins showing like,
gopi-VirtualBoxCLI> ari show status
ARI Status:
Enabled: Yes
Output format: pretty
Auth realm: Asterisk REST Interface
Allowed Origins: localhost:8088,http://ari.asterisk.org
User count: 1
gopi-VirtualBox
CLI>

I don’t understand your comment. Are you saying you’ve changed the configuration file, but it’s not being reflected in Asterisk? If so then I think something is overwriting it or you aren’t modifying the correct file. Are you using a GUI or something else?

Yes my modifications are not reflecting w.r.t to allowed_origins.

In ari.conf file i mentioned like “allowed_aorigins = *” but the output of “ari show staus”
showing different “Allowed Origins: localhost:8088,http://ari.asterisk.org

I am not using any GUI, Initially i configured http.conf,extensions.conf,ari.conf and sip.conf to make call connection between two soft phones registered with two extensions 1000,1001.

installed ari-py library and copied “channel-dump.py” in the library path. After staring asterisk, try to run channel-dump and try to make call from 1001 to 1000

In your last comment you specified “allowed_aorigins” which is not correct. It should be “allowed_origins”. That being said, there is no default value for “allowed_origins” so I’m still not sure where it would be coming from.

sorry that one is typo mistake

To save the configuration changes in ari.conf, what are commands do we need to run? could you please let me know.

Actually i am running “service asterisk restart” and “asterisk -r”. These commands are enough?

Those commands restart Asterisk and attach to its console.

How can we make sure, changes in ari.conf file applied properly to the asterisk.

Modify the right file.

Ensure that nothing else will then overwrite that file.

Stop then start Asterisk.

Hi @david551

i did my changes in ari.conf file w.r.t allowed origins

After stop and start asterisk, “ari show status” different values for Allowed origins.

After asterisk restart, i have checked ari.conf file content. It is not overwrite, which means to display the content for “ari show status” asterisk picking the content somewhere else other than ari.conf. Is it possible?