fix: 🐛 silently drop trailing slashes from origin input
This commit is contained in:
4 files changed
+21
-23
No files matched your search
@@ -63,6 +63,10 @@ export default class OriginService extends Service {
|
||||
typeof origin === 'string'
|
||||
);
|
||||
try {
|
||||
// Silently drop trailing slashes if present.
|
||||
// This is important since API paths that will be appended to the origin
|
||||
// will include preceeding slashes already.
|
||||
origin = origin.replace(/\/*$/, '');
|
||||
this.adapter.host = origin;
|
||||
this.rendererOrigin = origin;
|
||||
if (origin !== (await this.mainOrigin)) {
|
||||
|
||||
Reference in new issue
Block a user