You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 13, 2022. It is now read-only.
But because we use relative paths in jQuery's $.ajax function, it tries to resolve to the same level as the instance pathname if we don't add a trailing space on the url. It leads to false incident alarms when the users forget to provide the trailing slashes
Expected Behavior
The application should load when accessing https://mysite.com/instance-prod in the same way as https://mysite.com/instance-prod/
Actual behaviour
When accessing https://mysite.com/instance-prod, the ajax function tries to load
The text was updated successfully, but these errors were encountered:
nanndoj
changed the title
Relative paths not being resolved without a trailing slash on the pathname
Relative path not resolved without a trailing slash in the pathname
Nov 24, 2019
I have three x-road instances configured to the same server under different pathnames
But because we use relative paths in jQuery's
$.ajax
function, it tries to resolve to the same level as the instance pathname if we don't add a trailing space on the url. It leads to false incident alarms when the users forget to provide the trailing slashesExpected Behavior
The application should load when accessing
https://mysite.com/instance-prod
in the same way ashttps://mysite.com/instance-prod/
Actual behaviour
When accessing
https://mysite.com/instance-prod
, the ajax function tries to loadhttps://mysite.com/get_incident_table_initialization_data
instead of
https://mysite.com/instance-prod/get_incident_table_initialization_data
Possible Solution
Use always the full path when issuing all the ajax requests:
or add the trailing slash to the pathname, if not present, during the initial load (
index.js
)The text was updated successfully, but these errors were encountered: