Skip to content

Commit ea4882a

Browse files
author
Pooya Parsa
committed
fix: support dynamic API_URL for SSR
1 parent fd1ef47 commit ea4882a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/module.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ module.exports = function nuxtAxios (_moduleOptions) {
5050
/* istanbul ignore if */
5151
if (process.env.API_URL) {
5252
options.baseURL = process.env.API_URL
53+
} else {
54+
process.env.API_URL = options.baseURL
5355
}
5456

5557
/* istanbul ignore if */

0 commit comments

Comments
 (0)