Skip to content

Commit 940719e

Browse files
committed
feat(ifc-cli): add support for proxy configuration via a json file
This adds support for ifc-cli proxying specified paths to a local dev server or other server to enable same-origin hosting features. Proxies are configured via a json file that maps paths to target URLs.
1 parent bd140bf commit 940719e

File tree

5 files changed

+734
-688
lines changed

5 files changed

+734
-688
lines changed

apps/ifc-example-client/ifc-cli.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ module.exports = function (frameRouter) {
44
frameRouter.clientConfig = {
55
clients: {
66
application1: {
7-
url: `http://${hostname}:8080/client-app-1/#/`,
7+
url: `/clients/client-app-1/#/`,
88
assignedRoute: "/app1",
99
},
1010
application2: {
1111
// We are removing the built-in proxy route example for now, as there are conflicts with vite and
1212
// we will be adding improvements to the proxy behavior in the near future
13-
url: `http://${hostname}:8080/client-app-2/#/`,
13+
url: `/clients/client-app-2/#/`,
1414
assignedRoute: "/app2",
15-
allow: "camera http://localhost:8080;", // optional
15+
allow: "camera self;", // optional
1616
sandbox: "allow-presentation allow-modals", // optional
1717
defaultTitle: "iframe Application 2 Example", // optional, but needed for accessibility
1818
},
1919
application3: {
2020
// We are removing the built-in proxy route example for now, as there are conflicts with vite and
2121
// we will be adding improvements to the proxy behavior in the near future
22-
url: `http://${hostname}:8080/client-app-2/#/`,
22+
url: `/clients/client-app-2/#/`,
2323
assignedRoute: "/app2/test",
24-
allow: "camera http://localhost:8080;", // optional
24+
allow: "camera self;", // optional
2525
sandbox: "allow-presentation allow-modals", // optional
2626
defaultTitle: "iframe Application 2 Example", // optional, but needed for accessibility
2727
},
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"/clients/": "http://localhost:8080/"
3+
}

0 commit comments

Comments
 (0)