I am trying to figure out how to proxy rewrite netlify functions from a domain to an other.
Lets say i have a public domain called https://example.com
At that domain theres som subpaths like /site1, /site2, /site3 (https://example.com/site1) that all have their own sites / applications.
The current rewrite settings on the top domain is:
from = “/site1/*”
to = “https://site1.example.com/:splat”
status = 200
force = true
Everything works as expected and the “shadow” domain can be accessed from the top domain.
But when i request a netlify function from the top domain i m not getting any result.
I get a 200 respons but the body is empty.
The example would be:
https://example.com/site1 → Works
https://example.com/site1/.netlify/functions/hello → Does not work
https://site1.example.com/.netlify/functions/hello → Works
The reason i have this setup is to have a top domain and run multiple sub applications/languages beneath it, and i dont know why the rewrite proxy for the netlify functions doesnt work.