This commit is contained in:
parent
902501f2b7
commit
14520fbce8
@ -86,7 +86,7 @@ export async function download<T extends {id:number, file:boolean}>(nodes: T[])
|
|||||||
form.innerHTML += `<input type="hidden" name="node" value="${nodes[0].id}">`;
|
form.innerHTML += `<input type="hidden" name="node" value="${nodes[0].id}">`;
|
||||||
} else {
|
} else {
|
||||||
form.action = '/api/public/download_multi';
|
form.action = '/api/public/download_multi';
|
||||||
form.innerHTML += `<input type="hidden" name="nodes" value="${nodes.map(n => n.id).join('.')}">`;
|
form.innerHTML += `<input type="hidden" name="nodes" value="${nodes.map(n => n.id).join(',')}">`;
|
||||||
const resp = await workingWrapper(() => rpc.getNodesSize(nodes.map(v => v.id)));
|
const resp = await workingWrapper(() => rpc.getNodesSize(nodes.map(v => v.id)));
|
||||||
if (!resp)
|
if (!resp)
|
||||||
return;
|
return;
|
||||||
|
@ -9,6 +9,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||||||
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
||||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Profile;
|
||||||
import org.springframework.http.HttpOutputMessage;
|
import org.springframework.http.HttpOutputMessage;
|
||||||
import org.springframework.http.converter.HttpMessageConverter;
|
import org.springframework.http.converter.HttpMessageConverter;
|
||||||
import org.springframework.http.converter.HttpMessageNotWritableException;
|
import org.springframework.http.converter.HttpMessageNotWritableException;
|
||||||
@ -52,6 +53,7 @@ public class FileServerApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@Profile("!dev")
|
||||||
public FilterRegistrationBean<Filter> nonApiToIndex() {
|
public FilterRegistrationBean<Filter> nonApiToIndex() {
|
||||||
return new FilterRegistrationBean<>((servletRequest, servletResponse, chain) -> {
|
return new FilterRegistrationBean<>((servletRequest, servletResponse, chain) -> {
|
||||||
String uri = ((HttpServletRequest) servletRequest).getRequestURI();
|
String uri = ((HttpServletRequest) servletRequest).getRequestURI();
|
||||||
|
Loading…
Reference in New Issue
Block a user