Polishing

This commit is contained in:
Sam Brannen
2022-11-28 16:45:38 +01:00
parent 6e5dd64025
commit 0a731413de
2 changed files with 7 additions and 4 deletions

View File

@@ -58,7 +58,7 @@ import org.springframework.web.util.WebUtils;
* path resolution and handling of static SockJS requests (e.g. "/info", "/iframe.html",
* etc). Sub-classes must handle session URLs (i.e. transport-specific requests).
*
* By default, only same origin requests are allowed. Use {@link #setAllowedOrigins}
* <p>By default, only same origin requests are allowed. Use {@link #setAllowedOrigins}
* to specify a list of allowed origins (a list containing "*" will allow all origins).
*
* @author Rossen Stoyanchev

View File

@@ -41,7 +41,7 @@ import org.springframework.web.util.JavaScriptUtils;
/**
* An HTTP {@link TransportHandler} that uses a famous browser
* {@code document.domain technique}. See <a href=
* {@code document.domain} technique. See <a href=
* "https://stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-do">
* stackoverflow.com/questions/1481251/what-does-document-domain-document-domain-do</a>
* for details.
@@ -61,10 +61,13 @@ public class HtmlFileTransportHandler extends AbstractHttpSendingTransportHandle
static {
StringBuilder sb = new StringBuilder("""
<!DOCTYPE html>
<html><head>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head><body><h2>Don't panic!</h2>
</head>
<body>
<h2>Don't panic!</h2>
<script>
document.domain = document.domain;
var c = parent.%s;