This is commmon things that happen when we’re using “window.location.origin” to define the path for AJAX call or another purpose.
Actually, “window.location.origin” isn’t in browser standard. Firefox try the best to obey the standard which “window.location.origin” is not supported hence it give “undefined” result.
Substitution for this, you can use:
1 | window.location.protocol + "//" + window.location.host |