gatsby-theme-q3 3.2.4 → 3.2.5
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +11 -0
- package/gatsby-browser.js +6 -5
- package/gatsby-config.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,17 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [3.2.5](https://github.com/3merge/q/compare/v3.2.4...v3.2.5) (2022-02-11)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* subdomain detection in production ([c7d91ca](https://github.com/3merge/q/commit/c7d91ca8a694335fc5fc13888a529755d718ce3c))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
6
17
|
## [3.2.4](https://github.com/3merge/q/compare/v3.2.3...v3.2.4) (2022-02-10)
|
7
18
|
|
8
19
|
|
package/gatsby-browser.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import axios from 'axios';
|
2
|
-
import {
|
2
|
+
import { size } from 'lodash';
|
3
3
|
import { getDomain } from 'q3-admin';
|
4
4
|
import { browser } from 'q3-ui-helpers';
|
5
5
|
|
@@ -22,11 +22,12 @@ export const onClientEntry = async () => {
|
|
22
22
|
|
23
23
|
// set tenant default
|
24
24
|
const { host } = window.location;
|
25
|
-
const
|
25
|
+
const str = String(host);
|
26
|
+
const offset = str.includes('localhost') ? -1 : -2;
|
27
|
+
const parts = str.split('.').slice(0, offset).join('.');
|
26
28
|
|
27
|
-
if (size(parts)
|
28
|
-
axios.defaults.headers['X-Session-Tenant'] =
|
29
|
-
last(parts);
|
29
|
+
if (size(parts))
|
30
|
+
axios.defaults.headers['X-Session-Tenant'] = parts;
|
30
31
|
|
31
32
|
// calls Q3 API
|
32
33
|
await getDomain();
|
package/gatsby-config.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "gatsby-theme-q3",
|
3
|
-
"version": "3.2.
|
3
|
+
"version": "3.2.5",
|
4
4
|
"main": "index.js",
|
5
5
|
"license": "MIT",
|
6
6
|
"peerDependencies": {
|
@@ -42,5 +42,5 @@
|
|
42
42
|
"transform-loader": "^0.2.4",
|
43
43
|
"yarn": "^1.22.17"
|
44
44
|
},
|
45
|
-
"gitHead": "
|
45
|
+
"gitHead": "491dbd6d8280a171288f7054f6e29261c530a53c"
|
46
46
|
}
|