working on search
This commit is contained in:
@@ -72,20 +72,7 @@ public class UserModule extends BaseHandler {
|
||||
logins = loginDb;
|
||||
}
|
||||
|
||||
private HttpExchange addCors(HttpExchange ex){
|
||||
var headers = ex.getRequestHeaders();
|
||||
var origin = nullable(headers.get("Origin")).orElse(List.of()).stream().filter(url -> url.contains("://localhost")||url.contains("://127.0.0.1")).findAny();
|
||||
if (origin.isPresent()) {
|
||||
var url = origin.get();
|
||||
headers = ex.getResponseHeaders();
|
||||
headers.add("Allow-Origin", url);
|
||||
headers.add("Access-Control-Allow-Origin", url);
|
||||
headers.add("Access-Control-Allow-Headers", "Content-Type");
|
||||
headers.add("Access-Control-Allow-Credentials", "true");
|
||||
headers.add("Access-Control-Allow-Methods","DELETE, GET, POST, PATCH");
|
||||
}
|
||||
return ex;
|
||||
}
|
||||
|
||||
|
||||
private boolean deleteOIDC(HttpExchange ex, UmbrellaUser user, Path path) throws IOException {
|
||||
var head = path.pop();
|
||||
|
||||
Reference in New Issue
Block a user