Open javadihugo opened 3 weeks ago
Love this tool BTW. Only used it so I could deploy Zero the recommended way, but I can see it being my default going forward.
Are you still having issues? Your links seemed to work for me.
Are you still having issues? Your links seemed to work for me.
Yes sir. Really? app.dev.planethire.ai returns a freshly generated Next.js site instead of the marketing site HTML for you?
I just checked in a new browser and that wasn’t the case for me.
Also, the access denied issue on the marketing site’s company page remains.
When I create an invalidation for /*
manually on CloudFront, it sometimes changes which of the two sites is properly rendered.
Seems somewhat related to https://github.com/sst/sst/issues/5861.
Perhaps this is my answer? https://github.com/sst/sst/issues/5071#issuecomment-2479811901
Sharing a router between two Next.js apps appears to be the problem. I don't have this problem when sharing a router between a Next.js app and SPA.
Actually let me keep this open.
@jayair regarding my bonus question
Cheeky bonus question: any idea why (with the original ui.ts ordering - which I've left deployed) the company page on the marketing site returns an Access Denied XML page?
It turns out that was because I had a /company
page displaying images from a public /company
directory.
This is documented here https://opennext.js.org/aws/common_issues#access-denied-errors-on-routes-during-page-refresh-and-direct-url-access.
I renamed the /company
public image directory to /planethire
and it now works.
Hey!
I'm using SST V3.
I'm new to cloud and SST so I am probably doing something stupid.
router.ts
ui.ts
Marketing is this Tailwind Plus template https://radiant.tailwindui.com/. Web is a freshly generated Next.js app.
I'm following this guide https://sst.dev/docs/configure-a-router/.
I set up a zone for planethire.ai in my production account and dev.planethire.ai in my dev account.
After deploying, https://dev.planethire.ai returns the marketing site. However, https://app.dev.planethire.ai returns the HTML of the marketing site instead of the freshly generated Next.js app.
If I reverse the order in
ui.ts
After deploying, https://app.dev.planethire.ai returns the freshly generated Next.js app. However, https://dev.planethire.ai returns the HTML of the freshly generated Next.js app instead of the marketing site.
Cheeky bonus question: any idea why (with the original
ui.ts
ordering - which I've left deployed) the company page on the marketing site returns an Access Denied XML page?Upgraded from Next 14 to 15 so could have messed something up there! All the other pages work fine.