-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove trailing slash in container service host url if present #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than one lint nit!
src/programs/aws.ts
Outdated
@@ -186,6 +186,7 @@ export const AWSProgram = (opts: OptionValues) => { | |||
}; | |||
|
|||
/* eslint-disable no-new */ | |||
const CONTAINER_SERVICE_URL = containerService.url.endsWith("/") ? containerService.url.slice(0, -1) : containerService.url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this up above the eslint-disable no-new
? That line should be associated with the following line, so this should be moved up above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, sorry, didn't notice that or have the pre-commit running. Should be good now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
src/programs/aws.ts
Outdated
@@ -185,6 +185,9 @@ export const AWSProgram = (opts: OptionValues) => { | |||
DATABASE_PASSWORD: db?.masterPassword, | |||
}; | |||
|
|||
const CONTAINER_SERVICE_URL = containerService.url.endsWith('/') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pulumi variables are not strings, so thats why it is failing on tsc
.
Something like containerService.url.apply(v => v.endsWith('/') ? v.slice(0, -1) : v)
should work in this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay. Thanks for that info! Made the change
Hey, I just made a Pull Request!
This change removes trailing backslashes "/" that are included in the Pulumi LightSail Container Service url output. This would impact frontend API request routing to backend endpoints.
✔️ Checklist
Signed-off-by
line in the message. (more info)