unlock-protocol / locked.fyi

A basic notes application where notes are stored on IPFS and only visible by members of a lock
https://locked.fyi/
MIT License
21 stars 7 forks source link

Non-root deploys rewrite URI incorrectly #35

Open bmann opened 4 years ago

bmann commented 4 years ago

As per the instructions from a yarn build:

The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.

I added the following:

"homepage": "/Apps/LockedFYI/"

I then deployed using Fission to my own domain on IPFS at https://boris.fission.name/Apps/LockedFYI/

I can login and create notes, but browsing notes rewrites the URI like boris.fission.name/notes/0xA8….

Should respect the non-root path.

julien51 commented 4 years ago

Thanks! This is very helpful. I think for the same of configurability we'll make this an ENV variable, but that's pretty straightforward! Deploying to Fission will be very very cool ;)

julien51 commented 4 years ago

I think we have a problem because even though the client side nav seems to work, the actual URLs do not resolve (for example, the writing interface is at https://boris.fission.name/notes/write.

I'll have to dig a little deeper!

bmann commented 4 years ago

The writing interface should be at /Apps/LockedFYI/notes/write — the files aren’t installed at the root.

Also, unless that path exists, we don’t (currently) have SPA routing — you need to use either #notes/write or similar.

No servers on IPFS gateways.