KC
KC
WWasp-lang
Created by Ramon on 9/4/2024 in #đŸ™‹questions
Authenticated image download
Another option could be to proxy stream the media from your server instead of a URL.
10 replies
WWasp-lang
Created by Ramon on 9/4/2024 in #đŸ™‹questions
Authenticated image download
@Ramon I would recommend returning a pre-signed URL from S3 with a short TTL. If you want some inspiration, the openSaaS project has this implementation to upload files — https://docs.opensaas.sh/guides/file-uploading/. You can do something similar to view the files as well. Official docs: https://docs.aws.amazon.com/AmazonS3/latest/userguide/ShareObjectPreSignedURL.html
10 replies
WWasp-lang
Created by KC on 8/9/2024 in #đŸ™‹questions
A possible bug: wasp deploy fly deploy resets the server URL
The deploy action should only set it if the variable is set by the user in GitHub.
12 replies
WWasp-lang
Created by KC on 8/9/2024 in #đŸ™‹questions
A possible bug: wasp deploy fly deploy resets the server URL
@miho I think the deploy action should also allow you to set a variable and the :wasplang: CLI should also use that when generating the client like I've pushed here: https://github.com/wasp-lang/wasp/pull/2234/files#diff-bff2e4075ad24d9e91eb8d133842dea04ea1bd24d9f2318186ab80cf96348d0eR111 I am going to test this out today and see if it works as expected.
12 replies
WWasp-lang
Created by KC on 8/9/2024 in #đŸ™‹questions
A possible bug: wasp deploy fly deploy resets the server URL
12 replies
WWasp-lang
Created by KC on 8/9/2024 in #đŸ™‹questions
A possible bug: wasp deploy fly deploy resets the server URL
I am guessing this could be a simple fix with something like: const serverUrl = process.env.SERVER_URL || deploymentInfo.serverUrl; If there isn't any other way, I am happy to fix this in a PR. I was exploring the codebase and I am also seeing other places that are referring to the WASP_SERVER_URL, we could possibly use that for consistency?
12 replies
WWasp-lang
Created by KC on 8/9/2024 in #đŸ™‹questions
A possible bug: wasp deploy fly deploy resets the server URL
The env variable WASP_SERVER_URL is set to the correct URL but still doesn't work.
12 replies
WWasp-lang
Created by KC on 8/9/2024 in #đŸ™‹questions
A possible bug: wasp deploy fly deploy resets the server URL
As a workaround, I am building the client from .wasp/build/web-app and then deploying with the correct value for the REACT_APP_API_URL variable.
12 replies
WWasp-lang
Created by KC on 8/5/2024 in #đŸ™‹questions
redirect incoming request to a path with a new header
Wonderful! Thanks @miho, I'll give that a shot to see how it works. If I go that route, I'll share details on how I set it up with the CI etc., here.
14 replies
WWasp-lang
Created by KC on 8/5/2024 in #đŸ™‹questions
redirect incoming request to a path with a new header
Thanks for the super detailed response here Miho! I tried the API route but then realised that only works for the server, not the client. Hypothetically, would it be possible to generate an Astro site and run it alongside Wasp's client on the same machine? I am now thinking the best way is to use a reverse-proxy and send the traffic to the machines accordingly. (may be I could try CNAME with a sub-domain as well)
14 replies
WWasp-lang
Created by KC on 8/5/2024 in #đŸ™‹questions
redirect incoming request to a path with a new header
@miho Wondering if you had a chance to take a look at this. Do you have any suggestions here? Thank you! đŸ˜„
14 replies
WWasp-lang
Created by KC on 8/5/2024 in #đŸ™‹questions
redirect incoming request to a path with a new header
14 replies
WWasp-lang
Created by KC on 8/5/2024 in #đŸ™‹questions
redirect incoming request to a path with a new header
Thanks @matija! I am specifically looking to scale to 0 when there isn't any traffic on the blog and let the app machines not get worked up with the blog/docs traffic. I think Open SaaS also asks you to host the blog on Netlify or similar if I remember it right. They are not hosted together on the same machine. @Vinny (@Wasp) A good addition to the Open SaaS docs would be on how to point example.com/blog to the blog site from the Open SaaS app. Back to this problem it looks like route doesn't accept any middleware or functions. So I am trying to see if I can get this done by using an api instead but somehow the API isn't rendering and I am getting a 404 or "This site needs JS" when hitting the URL from the terminal.
14 replies
WWasp-lang
Created by KC on 8/5/2024 in #đŸ™‹questions
redirect incoming request to a path with a new header
I might use Docusaurus or Astro for the blog but what I am looking to do is to let Fly Proxy replay the request on the correct machine. I am wondering if there is something I can setup in the main.wasp file like this (I know Wasp uses Express under the hood, so the handler would have some express code, may be?):
route RedirectBlogRoute {
path: "/blog*"
middlewareConfigFn: import { redirectBlogHandler } from "@src/redirectBlog.js"
route RedirectBlogRoute {
path: "/blog*"
middlewareConfigFn: import { redirectBlogHandler } from "@src/redirectBlog.js"
But that's only a middleware.
14 replies
WWasp-lang
Created by KC on 6/18/2024 in #đŸ™‹questions
How do I debug why an actions endpoint is returning a 404?
I am turning on logging now so that I can figure out what is going on in the future.
15 replies
WWasp-lang
Created by KC on 6/18/2024 in #đŸ™‹questions
How do I debug why an actions endpoint is returning a 404?
On digging in further, you can ignore the above because logging was off on postgres.
15 replies
WWasp-lang
Created by KC on 6/18/2024 in #đŸ™‹questions
How do I debug why an actions endpoint is returning a 404?
No description
15 replies
WWasp-lang
Created by KC on 6/18/2024 in #đŸ™‹questions
How do I debug why an actions endpoint is returning a 404?
My first thought was if somehow that DB was inaccessible to the server. I checked if there were any changes to the env variables but nothing changed there. So I didn't know what else to check.
15 replies
WWasp-lang
Created by KC on 6/18/2024 in #đŸ™‹questions
How do I debug why an actions endpoint is returning a 404?
No description
15 replies
WWasp-lang
Created by KC on 6/18/2024 in #đŸ™‹questions
How do I debug why an actions endpoint is returning a 404?
Is there a way I can look deeper into what was happening instead of just the 404. I would have loved to see if there was a query that was failing. I never looked at the DB Logs, let me see if I can still find something there.
15 replies