[Home]

Summary:ASTERISK-26320: ari.asterisk.org resets values on page reload
Reporter:Sébastien Duthil (sduthil)Labels:
Date Opened:2016-08-26 14:23:59Date Closed:
Priority:TrivialRegression?No
Status:Open/NewComponents:
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Browser: Iceweasel 44.0 Asterisk: 13.10.0Attachments:( 0) index.html.diff
Description:Given I have configured Asterisk to serve the ARI swagger doc on http://mybox:1234/, with a user "me", password "opensesame"
Given I open my browser on http://ari.asterisk.org
Given I set the values (URL, user:password) and click Explore
Given I see correctly the Swagger doc
When I reload the page
Then the Swagger URL is reset to the default http://localhost:8088/...
Then the user:password are still set correctly
Then the Swagger doc is not displayed anymore, it reads:
   Can't read from server. It may not have the appropriate access-control-origin settings.

What I'd expect:
* The URL does not change (since the user:password are not reset)
* The swagger doc is reloaded and displayed along with the page

My use case is actually that I always keep http://ari.asterisk.org in a background tab in my browser, because it's a really useful documentation when developing ARI applications. Eventually I close my browser and I start it back up. Then it reloads the tabs of my previous session, including http://ari.asterisk.org, but I can't use the Swagger doc directly, and I have to reconfigure the URL, user and password. I found out that loading the tabs of the previous session is the same scenario than directly reloading the page from the browser.
Comments:By: Asterisk Team (asteriskteam) 2016-08-26 14:23:59.939-0500

Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution.

A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report.

Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process].

By: Sébastien Duthil (sduthil) 2016-08-26 14:26:39.188-0500

I did not find any Git repo for ari.asterisk.org, so here is a small patch for http://ari.asterisk.org/index.html

I fixed two issues:
* the URL is not reset if already set
* the api_key authorization is sent at page load, if user:password is already set