Rank 5: Hypervisor
When go to my function URL, it executes twice.
/favicon.ico path always being the second execution.
Why is that happening?
Votes
0
Replies
13
Participants
Unknown
Messages
14
Rank 5: Hypervisor
When go to my function URL, it executes twice.
/favicon.ico path always being the second execution.
Why is that happening?
Admin
browsers automatically fetch favicon
Rank 5: Hypervisor
Ah, so I can't do anything about this?
You can check the path and return nothing at start so it will finish as fast as possible
Admin
not if you're opening it with a browser
Rank 5: Hypervisor
Well, still goes to execution count. 😄
Ooh for that part
Yes..
Rank 5: Hypervisor
Another thing
At some point I do return res.redirect(new URL(document.url));
Shouldn't this redirect me, in the browser, to the url that is set in here?
Rank 5: Hypervisor
If I run it from the browser
Admin
yes? depends on how you've done it
Rank 5: Hypervisor
redirection is inside a utility function that is in another file.
It doesn't redirect even tho it comes and executes that line of code.
Should redirect part rather be in the main method in main.ts rather than in the utility?
Rank 5: Hypervisor
Nevermind
Rank 5: Hypervisor
I actually forgot a return statement on utility call. It works. Ty
Rank 5: Hypervisor
[SOLVED] Cloud function executes twice from the URL