commit
95bafc416d
3 changed files with 6 additions and 2 deletions
1
pom.xml
1
pom.xml
|
@ -102,6 +102,7 @@
|
|||
<module>server</module>
|
||||
<module>timer</module>
|
||||
<module>bundled-war-example</module>
|
||||
<!-- <module>project-integrations</module> -->
|
||||
</modules>
|
||||
|
||||
<dependencyManagement>
|
||||
|
|
|
@ -10,6 +10,7 @@ import javax.activation.MimetypesFileTypeMap;
|
|||
import javax.ws.rs.GET;
|
||||
import javax.ws.rs.Path;
|
||||
import javax.ws.rs.PathParam;
|
||||
import javax.ws.rs.Produces;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.UriInfo;
|
||||
|
@ -47,7 +48,8 @@ public class AdminResource {
|
|||
Theme theme = ThemeLoader.createTheme(Config.getThemeAdmin(), Theme.Type.ADMIN);
|
||||
InputStream resource = theme.getResourceAsStream(path);
|
||||
if (resource != null) {
|
||||
return Response.ok(resource).type(mimeTypes.getContentType(path)).build();
|
||||
String contentType = mimeTypes.getContentType(path);
|
||||
return Response.ok(resource).type(contentType).build();
|
||||
} else {
|
||||
return Response.status(Response.Status.NOT_FOUND).build();
|
||||
}
|
||||
|
|
3
services/src/main/resources/META-INF/mime.types
Normal file → Executable file
3
services/src/main/resources/META-INF/mime.types
Normal file → Executable file
|
@ -1,4 +1,5 @@
|
|||
text/css css CSS
|
||||
text/javascript js JS
|
||||
text/javascript js JS
|
||||
image/svg+xml svg SVG
|
||||
image/svg+xml svg SVG
|
||||
text/html html htm HTML HTM
|
Loading…
Reference in a new issue