In single-spa-angular URL Redirection Infinite Loop - single-spa-angular

I am create micro frontend using single-spa-angular which has 3 angular app but on it URL Redirection Infinite Loop

This issue is fixed in single-spa-angular version 4.6.0. Also you will need to add NavigationStart to options in the same way you pass NgZone and Router in your main.single-spa.ts.
You can see the github issue here: https://github.com/single-spa/single-spa-angular/issues/113 .

Related

ExtJs 3.4, ExtDirect, Symfony and PHP 8.2 -> no data is returned

We are currently upgrading PHP form 7.1 to PHP 8.2 for a legacy application which uses Apache, FriendsOfSymfony 1.5.15, ExtJs 3.4 and ExtDirect.
The following problem occurs: Sending a request to the Symfony backend creates the result as expected. The ExtDirect plugin, dsExtDirectPlugin, handles the request and response until a certain point in the dsExtDirectRouter.class.php where the code echos the response from the Symfony endpoint:
echo json_encode(self::$response);
From this point on Symfony shutdowns down logging,... and I expect that the response echod is used in JavaScript from that point on, but in the Firefox development tools, I see "no data available" in the network tab. So the output doesn't seem to come to the frontend / is suppressed from being echod?
Does anyone have a clue what can cause this? Do I need an additional php or apache config?
Thanks and kind regards,
Dirk
I found the solution for my prolbem: fastcgi_finish_request seems to be executed too early. Probably there's still some kind of misconfiguration on the Apache / PHP. If I directly add the fastcgi_finish_request call after the result "echo" and comment out the method call in the sfWebResponse (cached) class, it works. Of course not the final solution to comment something out in a commented class, but at least knowing the problem is a first step to the final solution.

Change Directus 7 API url on the Dashboard in Docker

I am trying to use Directus 7 in Docker and I have encountered the following problem:
I have not been able to change the API URL in the Dashboard (APP), no matter what I assign to the environment variable API_ENDPOINT or API_URL. Whenever I open the dashboard it tries to go to the url http://localhost:7000..../ping, and since the API is not found there, it fails.
Is there any way to change the API URL in the dashboard in Docker ? I am using the images: directus/api:latest and directus/app:latest
You can see the example i am using in: https://github.com/directus/docker/blob/master/examples/single-api/docker-compose.yml
Thank you for your help.
Try to clear the browser-cache or force a reload using shift+f5. had the same prob and it turned out, that the first time a fired up the container I forgot to set the desired endpoint. when reloading the browser did not update the locally cached .js file.

Running graphgists locally fails

I'm interested in running a graphgist locally, for which there is a script here:
https://gist.github.com/jexp/70296ce410ff431ddbef
I was able to install the modules and run the two tasks but the last line of the script:
open http://localhost:8000/?http%3A%2F%2Flocalhost%3A8000%2Fgists%2Fmy-graph-use-case.adoc
produces an error: Not Found and trying to open the link in the comments:
http://localhost:8000/gists/my-graph-use-case.adoc
causes my browser to download a file for which I have no associated application. has anyone made this work and if so, how?
according to #MichaelHunger the issue is that the default behaviour in Python's SimpleHTTPServer is such that a trailing slash (/) gets added to the end of the url, messing up the request.
according to #PratikMandrekar, in the following article, the problem is that the url as it is in the script does not explicitly specify the file name, forcing the server to redirect to the default. see:
Why does SimpleHTTPServer redirect to ?querystring/ when I request ?querystring?
so after a little experimentation I found this to work:
http://localhost:8000/index.html?http%3A%2F%2Flocalhost%3A8000%2Fgists%2Fmy-graph-use-case.adoc
notice that the colons, slashes, etc. in the inner url must be encoded for this to work
There is a bug/default behavior in simple-http-client that makes it add slashes after query parameters which breaks our app in this case, I have to find a better replacement or fix it.
Perhaps I can also change the rabbithole project to server the graphgist files itself, so that it would be self-contained.

Twitteroauth with localhost

I currently have a website up and running that uses the Twitteroauth classes (abraham's) and the Twitter API. It is all working as it should, however, I want to also run the project on my localhost for debugging/coding purposes so that I am not in danger of messing up my live version.
I am wondering if it is possible to run Twitterouth on localhost. I know that there are ways to manipulate the callback URL of the application on Twitter's site, however I do not want to do that as my live version needs the callback URL.
I hope this makes sense and I hope there is a solution out there.
Thank you.
It is possible to run Twitteroauth in localhost. You should make a copy of your project files from your website and copy it to your localhost.
You might see a file "config.php" where you'll define the callback url.
define('OAUTH_CALLBACK', 'http://localhost/path_to_callback.php file');
It will redirect you to your callback.php file and it works in localhost.
For running Abramham William's twitteraouth locally , you can create another test application on twitter so that it don't disturb the live version . Then instead of using localhost/ in your address bar , you should use the IP address of your localhost , this mistake by me consumed a lot of time .
Example :
127.0.0.1/twittertest/index.php and not localhost/twittertest/index.php in your address bar .
You'll need to give the same oauth callback in your twitter application .

How to serve a defined path with Meteor?

Currently I'm connecting to my meteor project using http://localhost:3000 which uses my meteorApp.html file.
How could I make Meteor respond to the following url:
http://localhost:3000/otherPath ?
To be more explicit, I do have a file on the server side I just would like to be able to retrieve on the client side using http://localhost:3000/nameOfTheFile.sufix
I think you can just put nameOfTheFile.sufix under public directory.
See http://docs.meteor.com/#structuringyourapp
If you want otherPath to be within meteor app, public won't do.
There are several ways to do that, http://multi-page-config.meteor.com is one way to create what looks like a traditional multipage site within one meteor process.
I did this a while ago and have since perfected it a bit but haven't updated it.. this at least might give you some ideas... you can look at the source here: https://github.com/bolora/multi-page-config

Resources