AWS S3 Integration
Hello! I am brand new to Railway and just deployed my first app. I will be using AWS S3 in order to save/serve static files. Are their any Railway specifics I should know about when it comes to content delivery? Anything specific I should add to my Django project?
Specifically, I am wondering about the CORS configuration and if anyone has any idea what the proper CORS parameters are.
project id is puny-wrench
7 Replies
Project ID:
206b13ca-0f29-443f-8f6e-8ad345de9d90
206b13ca-0f29-443f-8f6e-8ad345de9d90
would recommend checking out cloudflare, even on their free plan you can leverage their CDNs to deliver static content way faster/save you some network bills
but as for in-place optimization not a ton aside from your standard compression algos which you could just do with an internal nginx server
as for CORS the general idea is to have your settings kinda set like this
everything else should work by default if you have the module installed
Sweet, I will take a look at Cloudflare. May be a simpler option! And beautiful, it looks like AWS has their own place on the website to set up CORD credentials. It looks like your suggestion would live in my website settings rather than AWS?
ah you're referencing S3 CORS, in that case I'd say try setting it to just your site's url, and if you notice bugginess there, set it to accept any origin
i'm not sure what django's behavior there is, i think it should proxy the client requests thru your app if you're using serverside rendering
Yes I have a decent idea of the Django side, I have never used AWS before or Railway so i just wanted to double check i wasn't missing any steps. I believe you have set me up for success, thank you!
For sure, best of luck