@@ -453,7 +453,7 @@ public interface Context extends Registry {
453453 * Recreates full/entire request url using the <code>Host</code> header.
454454 *
455455 * If you run behind a reverse proxy that has been configured to send the X-Forwarded-* header,
456- * please consider to add {@link ProxyPeerAddressHandler} to your pipeline .
456+ * please consider to set {@link Router#setTrustProxy(boolean)} option .
457457 *
458458 * @return Full/entire request url using the <code>Host</code> header.
459459 */
@@ -463,43 +463,18 @@ public interface Context extends Registry {
463463 * Recreates full/entire request url using the <code>Host</code> header.
464464 *
465465 * If you run behind a reverse proxy that has been configured to send the X-Forwarded-* header,
466- * please consider to add {@link ProxyPeerAddressHandler} to your pipeline .
466+ * please consider to set {@link Router#setTrustProxy(boolean)} option .
467467 *
468468 * @param path Path to use.
469469 * @return Full/entire request url using the <code>Host</code> header.
470470 */
471471 @ Nonnull String getRequestURL (@ Nonnull String path );
472472
473- /**
474- * Recreates full/entire request url using the <code>X-Forwarded-Host</code> when present
475- * or fallback to <code>Host</code> header when missing.
476- *
477- * @param useProxy True to trust/use the <code>X-Forwarded-Host</code>.
478- * @return Full/entire request url using the <code>X-Forwarded-Host</code> when present
479- * or fallback to <code>Host</code> header when missing.
480- * @deprecated Use {@link ProxyPeerAddressHandler}.
481- */
482- @ Deprecated
483- @ Nonnull String getRequestURL (boolean useProxy );
484-
485- /**
486- * Recreates full/entire request url using the <code>X-Forwarded-Host</code> when present
487- * or fallback to <code>Host</code> header when missing.
488- *
489- * @param path Path to use.
490- * @param useProxy True to trust/use the <code>X-Forwarded-Host</code>.
491- * @return Full/entire request url using the <code>X-Forwarded-Host</code> when present
492- * or fallback to <code>Host</code> header when missing.
493- * @deprecated Use {@link ProxyPeerAddressHandler}.
494- */
495- @ Deprecated
496- @ Nonnull String getRequestURL (@ Nonnull String path , boolean useProxy );
497-
498473 /**
499474 * The IP address of the client or last proxy that sent the request.
500475 *
501476 * If you run behind a reverse proxy that has been configured to send the X-Forwarded-* header,
502- * please consider to add {@link ProxyPeerAddressHandler} to your pipeline .
477+ * please consider to set {@link Router#setTrustProxy(boolean)} option .
503478 *
504479 * @return The IP address of the client or last proxy that sent the request.
505480 */
@@ -519,7 +494,7 @@ public interface Context extends Registry {
519494 * {@link #setHost(String)} method.
520495 *
521496 * If you run behind a reverse proxy that has been configured to send the X-Forwarded-* header,
522- * please consider to add {@link ProxyPeerAddressHandler} to your pipeline .
497+ * please consider to set {@link Router#setTrustProxy(boolean)} option .
523498 *
524499 * @return Return the host that this request was sent to, in general this will be the
525500 * value of the Host header, minus the port specifier.
@@ -541,25 +516,13 @@ public interface Context extends Registry {
541516 * value of the Host.
542517 *
543518 * If you run behind a reverse proxy that has been configured to send the X-Forwarded-* header,
544- * please consider to add {@link ProxyPeerAddressHandler} to your pipeline .
519+ * please consider to set {@link Router#setTrustProxy(boolean)} option .
545520 *
546521 * @return Return the host that this request was sent to, in general this will be the
547522 * value of the Host header.
548523 */
549524 @ Nonnull String getHostAndPort ();
550525
551- /**
552- * Return the host and port that this request was sent to, in general this will be the
553- * value of the Host or X-Forwarded-Host header.
554- *
555- * @param useProxy When true this method looks for host data in the X-Forwarded-Host header.
556- * @return Return the host that this request was sent to, in general this will be the
557- * value of the Host header.
558- * @deprecated Use {@link ProxyPeerAddressHandler}.
559- */
560- @ Deprecated
561- @ Nonnull String getHostAndPort (boolean useProxy );
562-
563526 /**
564527 * Return the port that this request was sent to. In general this will be the value of the Host
565528 * header, minus the host name.
0 commit comments