mirror of
https://github.com/cloudreve/frontend.git
synced 2025-12-25 19:52:48 +00:00
feat(source link): create perm source link with shorter url
This commit is contained in:
parent
2ca4a957a5
commit
10eedadea3
|
|
@ -666,6 +666,7 @@ module.exports = function(webpackEnv) {
|
|||
// a route with query params (e.g. auth callbacks).
|
||||
new RegExp('/[^/?]+\\.[^/]+$'),
|
||||
new RegExp(/^\/api/),
|
||||
new RegExp(/^\/f/),
|
||||
new RegExp(/^\/custom/),
|
||||
],
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -1065,8 +1065,12 @@ export const batchGetSource = (): ThunkAction<any, any, any, any> => {
|
|||
|
||||
API.post("/file/source", { items: items })
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
dispatch(closeAllModals());
|
||||
if (response.data.length == 1 && response.data[0].error) {
|
||||
dispatch(toggleSnackbar("top", "right", response.data[0].error, "warning"));
|
||||
return
|
||||
}
|
||||
|
||||
dispatch(
|
||||
openGetSourceDialog(
|
||||
response.data.length == 1
|
||||
|
|
|
|||
|
|
@ -1,19 +1,11 @@
|
|||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
const proxy = require("http-proxy-middleware");
|
||||
module.exports = function (app) {
|
||||
app.use(
|
||||
"/api",
|
||||
["/api","/custom","/f"].map(p=>app.use(
|
||||
p,
|
||||
proxy({
|
||||
target: "http://localhost:5212",
|
||||
changeOrigin: true,
|
||||
})
|
||||
);
|
||||
|
||||
app.use(
|
||||
"/custom",
|
||||
proxy({
|
||||
target: "http://localhost:5212",
|
||||
changeOrigin: true,
|
||||
})
|
||||
);
|
||||
))
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue