Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backend: add absolute path to template links #520

Merged
merged 1 commit into from Jul 22, 2016
Merged

backend: add absolute path to template links #520

merged 1 commit into from Jul 22, 2016

Conversation

squat
Copy link
Contributor

@squat squat commented Jul 22, 2016

fixes: #502

WIP

Add a new template function called absPath that converts relative
paths to absolute paths based on the issuerURL. The template function
can be used in templates like:

<a href="{{ .MyRelativePath | absPath }}">

or simply:

<a href="{{ absPath }}/myrelativepath">

@@ -13,7 +13,7 @@ <h2 class="heading">Log in to Your Account</h2>
<div class="form-row">
<div class="input-desc">
<label for="password">Password</label>
<span class="subtle-text input-label-right">Forgot? <a href="/send-reset-password?session_key={{ .SessionKey }}">Reset Password</a></span>
<span class="subtle-text input-label-right">Forgot? <a href="{{ absPath }}/send-reset-password?session_key={{ .SessionKey }}">Reset Password</a></span>
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this wrong? E.g. if absPath returns /hi/ the URL path will be /hi//send-reset...

@ericchiang
Copy link
Contributor

lgtm, squash then I'll merge on green

fixes: #502

Add a new template function called `absPath` that converts relative
paths to absolute paths based on the issuerURL. The template function
can be used in templates like:
````html
<a href="{{ .MyRelativePath | absPath }}">
````
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenID Provider Configuration Information is stick to root path (/)
2 participants