-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API: Allow serving localstripe API from a custom URL
It can be desirable to use localstripe from a user-defined URL with a custom path, e.g.: https://domain/subpath/js.stripe.com/v3/ https://domain/subpath/v1/payment_intents/ https://domain/subpath/v1/customers/cus_S5TdpWqIoiuKlq/sources instead of: http://domain:8420/js.stripe.com/v3/ http://domain:8420/v1/payment_intents/ http://domain:8420/v1/customers/cus_S5TdpWqIoiuKlq/sources This can be achieved by using a reverse-proxy for example, but the JavaScript part of localstripe didn't support it. This commit fixes that by dynamically computing the base API URL from which the JavaScript code is loaded.
- Loading branch information
1 parent
9b9676f
commit c89bb15
Showing
1 changed file
with
15 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters