Skip to content
This repository has been archived by the owner on Oct 27, 2022. It is now read-only.

A bit of cleanup and make ngrok work out of the box #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/main/java/com/google/glassware/WebUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@ public class WebUtil {
* Builds a URL relative to this app's root.
*/
public static String buildUrl(HttpServletRequest req, String relativePath) {

GenericUrl url = new GenericUrl(req.getRequestURL().toString());
url.setRawPath(relativePath);
// If you're using a request forwarder, like ngrok, you probably need to
// change this function
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this comment supposed to mean? Which function should the developer change?

Nit: period at the end of the comment.

if (req.getServerName().contains("ngrok.com")) {
url.setScheme("https");
}
return url.build();
}

Expand Down
Binary file modified src/main/webapp/static/images/drill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/main/webapp/static/images/saturn-eclipse.jpg
Binary file not shown.
Binary file not shown.