src/main/kotlin/de/uapcore/lightpit/RequestMapping.kt

changeset 407
fa8274466c70
parent 404
c7f4a5e81202
equal deleted inserted replaced
406:2c0c9a4f81e2 407:fa8274466c70
131 request.setAttribute(Constants.REQ_ATTR_REDIRECT_LOCATION, baseHref + value) 131 request.setAttribute(Constants.REQ_ATTR_REDIRECT_LOCATION, baseHref + value)
132 } 132 }
133 } 133 }
134 134
135 /** 135 /**
136 * The sanitized referer link, if any.
137 */
138 val referer: String? = this.sanitizeReferer(request.getAttribute(Constants.REQ_ATTR_REFERER) as String?)
139
140 /**
141 * The view object. 136 * The view object.
142 * 137 *
143 * @see Constants#REQ_ATTR_VIEWMODEL 138 * @see Constants#REQ_ATTR_VIEWMODEL
144 */ 139 */
145 var view: View? = null 140 var view: View? = null
157 ) "" else ":${request.serverPort}" 152 ) "" else ":${request.serverPort}"
158 153
159 /** 154 /**
160 * The base path of this application. 155 * The base path of this application.
161 */ 156 */
162 val baseHref get() = "${request.scheme}://${request.serverName}$portInfo${request.contextPath}/" 157 val baseHref = "${request.scheme}://${request.serverName}$portInfo${request.contextPath}/"
158
159 /**
160 * The sanitized referer link, if any.
161 */
162 val referer: String? = this.sanitizeReferer(request.getAttribute(Constants.REQ_ATTR_REFERER) as String?)
163 163
164 init { 164 init {
165 request.setAttribute(Constants.REQ_ATTR_BASE_HREF, baseHref) 165 request.setAttribute(Constants.REQ_ATTR_BASE_HREF, baseHref)
166 } 166 }
167 167

mercurial