Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
fix:#2
Browse files Browse the repository at this point in the history
  • Loading branch information
barrydegraaff committed Mar 4, 2019
1 parent 63fd292 commit 57e7dbb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
40 changes: 21 additions & 19 deletions extension/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified extension/out/artifacts/extension_jar/extension.jar
Binary file not shown.
Binary file not shown.
5 changes: 3 additions & 2 deletions extension/src/tk/barrydegraaff/rocket/Rocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc

private void responseWriter(String action, HttpServletResponse resp, String message) {
try {
this.initializeRocketAPI();
resp.setHeader("Access-Control-Allow-Origin", this.rocketURL);
resp.setHeader("Access-Control-Allow-Credentials", "true");
switch (action) {
Expand All @@ -254,8 +255,8 @@ private void responseWriter(String action, HttpServletResponse resp, String mess
}
break;
case "unauthorized":
resp.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
resp.getWriter().write("Not authorized.");
resp.setHeader("Content-Type", "text/html");
resp.getWriter().write("<html><head></head><body><div style=\"background-color:white;color:black;padding:10px\">Please <a target=\"_blank\" href=\"" + this.loginurl + "\">Log in</a>.</div></body>");
break;
case "error":
resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
Expand Down

0 comments on commit 57e7dbb

Please sign in to comment.