[DEV] wrong route
This commit is contained in:
parent
74239e2eac
commit
68b5e13937
@ -107,7 +107,7 @@ RUN mkdir /application/
|
||||
COPY --from=build /tmp/back/out/maven/*.jar /application/application.jar
|
||||
# add front software:
|
||||
RUN mkdir /application/sso/
|
||||
COPY --from=build /tmp/sso/dist /application/sso/
|
||||
COPY --from=build /tmp/sso/dist /application/karso/
|
||||
RUN mkdir /application/karauth/
|
||||
COPY --from=build /tmp/front/dist /application/karauth/
|
||||
|
||||
|
@ -1,26 +1,15 @@
|
||||
package org.kar.oauth.api;
|
||||
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
|
||||
import javax.annotation.security.PermitAll;
|
||||
import javax.annotation.security.RolesAllowed;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.HttpHeaders;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import javax.ws.rs.core.SecurityContext;
|
||||
|
||||
import org.kar.oauth.util.ConfigVariable;
|
||||
|
||||
|
||||
@Path("/karauth")
|
||||
public class Front {
|
||||
private String getExtension(String filename) {
|
||||
@ -30,7 +19,7 @@ public class Front {
|
||||
return "";
|
||||
}
|
||||
private Response retrive(String fileName) throws Exception {
|
||||
String filePathName = ConfigVariable.getSsoFolder() + File.separator + fileName;
|
||||
String filePathName = ConfigVariable.getFrontFolder() + File.separator + fileName;
|
||||
String extention = getExtension(filePathName);
|
||||
String mineType = null;
|
||||
if (extention.equalsIgnoreCase("jpg") || extention.equalsIgnoreCase("jpeg")) {
|
||||
@ -77,6 +66,14 @@ public class Front {
|
||||
|
||||
return response.build();
|
||||
}
|
||||
|
||||
@GET
|
||||
@PermitAll()
|
||||
//@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||
//@CacheMaxAge(time = 10, unit = TimeUnit.DAYS)
|
||||
public Response retrive0() throws Exception {
|
||||
return retrive("index.html");
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{baseA}")
|
||||
@ -86,12 +83,14 @@ public class Front {
|
||||
public Response retrive1(@PathParam("baseA") String baseA) throws Exception {
|
||||
return retrive(baseA);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{baseA}/assets/images/{baseB}")
|
||||
@PermitAll()
|
||||
public Response retrive2(@PathParam("baseA") String baseA, @PathParam("baseB") String baseB) throws Exception {
|
||||
return retrive(baseA + File.separator + "assets" + File.separator + "images" + File.separator + baseB);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{baseA}/assets/js_3rd_party/{baseB}")
|
||||
@PermitAll()
|
||||
|
@ -1,22 +1,12 @@
|
||||
package org.kar.oauth.api;
|
||||
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.File;
|
||||
|
||||
import javax.annotation.security.PermitAll;
|
||||
import javax.annotation.security.RolesAllowed;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.ws.rs.*;
|
||||
import javax.ws.rs.core.CacheControl;
|
||||
import javax.ws.rs.core.Context;
|
||||
import javax.ws.rs.core.HttpHeaders;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.core.Response.ResponseBuilder;
|
||||
import javax.ws.rs.core.SecurityContext;
|
||||
|
||||
import org.kar.oauth.util.ConfigVariable;
|
||||
|
||||
@ -78,6 +68,14 @@ public class FrontSSO {
|
||||
return response.build();
|
||||
}
|
||||
|
||||
@GET
|
||||
@PermitAll()
|
||||
//@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
||||
//@CacheMaxAge(time = 10, unit = TimeUnit.DAYS)
|
||||
public Response retrive0() throws Exception {
|
||||
return retrive("index.html");
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{baseA}")
|
||||
@PermitAll()
|
||||
@ -86,12 +84,14 @@ public class FrontSSO {
|
||||
public Response retrive1(@PathParam("baseA") String baseA) throws Exception {
|
||||
return retrive(baseA);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{baseA}/assets/images/{baseB}")
|
||||
@PermitAll()
|
||||
public Response retrive2(@PathParam("baseA") String baseA, @PathParam("baseB") String baseB) throws Exception {
|
||||
return retrive(baseA + File.separator + "assets" + File.separator + "images" + File.separator + baseB);
|
||||
}
|
||||
|
||||
@GET
|
||||
@Path("{baseA}/assets/js_3rd_party/{baseB}")
|
||||
@PermitAll()
|
||||
|
Loading…
x
Reference in New Issue
Block a user