Skip to content

Commit

Permalink
Fix wrong URL in getTargetUrl (#677)
Browse files Browse the repository at this point in the history
## Summary
Fix wrong URL in `getTargetUrl` when `this.apiBaseUrl` is set. This can
happen when `INNGEST_DEV=1`.

## Checklist
<!-- Tick these items off as you progress. -->
<!-- If an item isn't applicable, ideally please strikeout the item by
wrapping it in "~~"" and suffix it with "N/A My reason for skipping
this." -->
<!-- e.g. "- [ ] ~~Added tests~~ N/A Only touches docs" -->

- [x] Added changesets if applicable
  • Loading branch information
amh4r authored Aug 12, 2024
1 parent 6a9947e commit f4c3dc4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-bats-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"inngest": patch
---

Fix wrong URL when INNGEST_DEV=1
4 changes: 4 additions & 0 deletions packages/inngest/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ export class InngestApi {
}

private async getTargetUrl(path: string): Promise<URL> {
if (this.apiBaseUrl) {
return new URL(path, this.apiBaseUrl);
}

let url = new URL(path, defaultInngestApiBaseUrl);

if (this.mode.isDev && this.mode.isInferred && !this.apiBaseUrl) {
Expand Down

0 comments on commit f4c3dc4

Please sign in to comment.