Skip to main content
Version: v1

InsecureUrlResolver Class

As the name implies this is not secure and should not be used in production. It simply makes the example easier to get up and running.

In our example we run a simple web server via webpack-dev-server. This defines a URL format of the form http://localhost:8080//.

We then need to map that to a Fluid based URL. These are of the form fluid://orderingUrl///.

The tenantId/documentId pair defines the 'full' document ID the service makes use of. The path is then an optional part of the URL that the document interprets and maps to a data store. It's exactly similar to how a web service works or a router inside of a single page app framework.

Signature

export declare class InsecureUrlResolver implements IUrlResolver

Implements: IUrlResolver

Constructors

Constructor Description
(constructor)(hostUrl, ordererUrl, storageUrl, tenantId, bearer, isForNodeTest) Constructs a new instance of the InsecureUrlResolver class

Methods

Method Return Type Description
createCreateNewRequest(fileName) IRequest
getAbsoluteUrl(resolvedUrl, relativeUrl) Promise<string>
resolve(request) Promise<IResolvedUrl | undefined>

Constructor Details

(constructor)

Constructs a new instance of the InsecureUrlResolver class

Signature

constructor(hostUrl: string, ordererUrl: string, storageUrl: string, tenantId: string, bearer: string, isForNodeTest?: boolean);

Parameters

Parameter Modifiers Type Description
hostUrl string
ordererUrl string
storageUrl string
tenantId string
bearer string
isForNodeTest optional boolean

Method Details

createCreateNewRequest

Signature

createCreateNewRequest(fileName?: string): IRequest;

Parameters

Parameter Modifiers Type Description
fileName optional string

Returns

Return type: IRequest

getAbsoluteUrl

Signature

getAbsoluteUrl(resolvedUrl: IResolvedUrl, relativeUrl: string): Promise<string>;

Parameters

Parameter Type Description
resolvedUrl IResolvedUrl
relativeUrl string

Returns

Return type: Promise<string>

resolve

Signature

resolve(request: IRequest): Promise<IResolvedUrl | undefined>;

Parameters

Parameter Type Description
request IRequest

Returns

Return type: Promise<IResolvedUrl | undefined>