CCF icon indicating copy to clipboard operation
CCF copied to clipboard

Remove hardcoded `/app` prefix for all application endpoints

Open jumaffre opened this issue 3 years ago • 0 comments

All apps endpoints are currently prefixed with /app. This is mostly for historical reasons, as we've always had 3 frontends (members, nodes and users) and a dispatch logic to each one based on the first "/word" in the URI.

Because this is less flexible for apps, we should remove the /app prefix altogether and let apps specify the full URI for each endpoint. For example, one endpoint could be installed under GET /app/foo and another one under GET /record).

As discussed with @eddyashton, this is possible without having to consider a larger frontend refactor (#1353).

  1. We can dispatch to the app frontend all requests that are not prefixed with /gov or /node (i.e. else rather than else if (/app)).
  2. We should prevent apps from installing at /gov or /node (both C++ and JS apps).

This is a breaking change that should only be introduced in 3.x.

jumaffre avatar May 26 '22 16:05 jumaffre