...can have direct URL's that don't have a location redirect
Currently we can have URLs that forward to localhost. But these use a redirect (30x). Some environments don't accept a location redirect. For example, we are developing Google Workspace Add-ons and it would be a great usecase for it, but we need a tool like ngrok to connect add-ons to our endpoints, since they need a 200 response.
-
Alejandro Estrella commented
I'm also facing a similar issue.
I believe when my frontend first makes a request, it goes through at first since it is the still the same domain. However, the response is then put in a redirect, which triggers cors on the browser since it is on a different domain. This prevents my frontend from reading the response.
I've tried setting my headers to allow cors, but this hasn't fixed the issue, since it appears the response is on a different domain which I can't figure out how to set cors on.
-
Anonymous commented
I think it is just because the exposed URLs (mine is:
https://5000-monospace-***-***-xxxx-xxxx.cluster-lknrrxxxxxx.cloudworkstations.dev/core/home
It shows a 'login with google' screen instead of serving my service.
It also requires a 'cookie' it seems, which is not possiblel from my service. -
Anonymous commented
I want to have a public API backend, that services (not a browser) can call. In this case. Google Workspace Add-ons. They do a request to my backend and expect a 200 response with a json object.
The documentation states:
We plan to simplify this in the near future, but for now, use the following workaround:
Projects that have an API backend can start their API services either manually in a terminal, or configure the startup command in the monospace.json file.
Open the port on which the API service runs to be accessible to your web frontend preview by running the following bash script in a terminal:export port=4000 #dont use restricted ports (8000, 9000-9002)
export API_SERVICE="https://$port-$WEB_HOST"
echo $API_SERVICEOpen the API_SERVICE URL above a new tab in your browser. This sets a required cookie through a redirect flow.
Your web app frontend can now access the API service at the fully qualified path.
But Google Add-ons are not able to do a redirect flow, besides, a lot of people get a google authentication issue as well (needs to be authenticated). Can I make a real public facing endpoint?
-
Kirupa Chinnathambi commented
I am not very familiar with the tools involved, so I apologize if what I am about to suggest is infeasible. Here goes...
I am assuming this workflow works in your local development environment. Are you able to replicate this in IDX by installing any additional tools and dependencies? (Or by using our Nix extensibility to preconfigure the environment during boot-up)