#AWS S3 Integration

11 messages · Page 1 of 1 (latest)

true pelican
#

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

hollow lavaBOT
#

Project ID: 206b13ca-0f29-443f-8f6e-8ad345de9d90

true pelican
#

206b13ca-0f29-443f-8f6e-8ad345de9d90

kind igloo
#

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

CORS_ALLOW_CREDENTIALS = True
CORS_ALLOWED_ORIGINS = [
    'your-domain.something.com',
    ...
]
#

everything else should work by default if you have the module installed

true pelican
#

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?

kind igloo
#

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

true pelican
#

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!