Added AxiosStrategy and ProxyStrategy Network Strategies
This commit is contained in:
8
functions/strategies/AxiosStrategy.js
Normal file
8
functions/strategies/AxiosStrategy.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import axios from "axios";
|
||||||
|
|
||||||
|
const axiosStrategy = async (req, _store) => {
|
||||||
|
const res = await axios(req);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default axiosStrategy;
|
||||||
13
functions/strategies/ProxyStrategy.js
Normal file
13
functions/strategies/ProxyStrategy.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import axios from "axios";
|
||||||
|
|
||||||
|
const proxyStrategy = async (req, store) => {
|
||||||
|
const proxyRes = await axios.post(
|
||||||
|
store.state.postwoman.settings.PROXY_URL ||
|
||||||
|
"https://postwoman.apollotv.xyz/",
|
||||||
|
req
|
||||||
|
);
|
||||||
|
|
||||||
|
return proxyRes.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default proxyStrategy;
|
||||||
Reference in New Issue
Block a user