a year ago
need to get a specific domain from a service in my project into a variable called CORS_ORIGIN. I know that I can use the RAILWAY_SERVICE_*SERVICE_NAME*_URL but i need to use the CORS_ORIGIN instead, is there any ${{ }} variable that can help me do that?.
16 Replies
a year ago
N/A
a year ago
something like this?
CORS_ORIGIN=${{ServiceName.RAILWAY_PUBLIC_DOMAIN}}a year ago
yep, that works?
a year ago
yep!
a year ago
will try it out, give me a minute
a year ago
a year ago
im guessing its only available at runtime?
a year ago
no, you can reference the domain at the service level
a year ago
so it would appear at build time?
a year ago
yes it would be available at build time
a year ago
just because im getting some errors with a env validator that i've and im guessing that i would need to move it to runtime
a year ago
hmmmm
a year ago
are you building with a dockerfile?
a year ago
yep, arg and env then?
a year ago
just ARG
a year ago