fastn icon indicating copy to clipboard operation
fastn copied to clipboard

WASM `fastn.url-mappings` don't work in a mounted app

Open siddhantk232 opened this issue 10 months ago • 0 comments

A system package that contains a .wasm module can declare a fastn.url-mappings entry in its FASTN.ftd:

-- import: fastn

-- fastn.package: lets-auth.fifthtry.site
system: lets-auth
system-is-confidential: false

-- fastn.url-mappings:

/backend/* -> wasm+proxy://email_auth_provider.wasm/*

Running fastn serve inside this package works and fastn is able to route requests to the wasm module when a request comes for /backend/*. However, this does not work when this app is mounted in another fastn package.

-- import: fastn

-- fastn.package: lets-auth-template.fifthtry.site

-- fastn.dependency: lets-auth.fifthtry.site

-- fastn.app: Lets Auth
mount-point: /-/auth/
package: lets-auth.fifthtry.site

Visiting /-/auth/backend/* does not attempt to serve request from the handlers defined inside the wasm module.

siddhantk232 avatar Feb 25 '25 05:02 siddhantk232