Skip to content

Commit 0a352c4

Browse files
authored
Merge pull request #58 from solid/fix-issuer-path-trimming
Fixed issuer path trimming
2 parents b95b4ae + 1e65a4e commit 0a352c4

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/preferred-provider.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ function discoverProviderFor (webId) {
6767
.then(providerFromHeaders => providerFromHeaders || discoverFromProfile(webId))
6868

6969
.then(providerUri => {
70-
// drop the path (provider origin only)
71-
if (providerUri) {
72-
providerUri = (new URL(providerUri)).origin
73-
}
74-
7570
validateProviderUri(providerUri, webId) // Throw an error if empty or invalid
7671

7772
return providerUri

test/unit/preferred-provider-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ describe('preferred-provider.js', () => {
3434
})
3535
})
3636

37-
it('should drop the path from extracted provider uri', () => {
37+
it('should not drop the path from extracted provider uri', () => {
3838
nock(serverUri)
3939
.options('/')
4040
.reply(204, 'No content', {
@@ -43,7 +43,7 @@ describe('preferred-provider.js', () => {
4343

4444
return provider.discoverProviderFor(webId)
4545
.then(providerUri => {
46-
expect(providerUri).to.equal('https://example.com')
46+
expect(providerUri).to.equal('https://example.com/')
4747
})
4848
})
4949

0 commit comments

Comments
 (0)