-
-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #483 from mkurz/fix-play-java-streaming-example
play-java-streaming-example: Add csp nonce
- Loading branch information
Showing
11 changed files
with
56 additions
and
44 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
play-java-streaming-example/app/controllers/HomeController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package controllers; | ||
|
||
import javax.inject.Inject; | ||
|
||
import play.routing.*; | ||
|
||
import play.mvc.Controller; | ||
import play.mvc.Http; | ||
import play.mvc.Result; | ||
|
||
public class HomeController extends Controller { | ||
|
||
public Result index(final Http.Request request) { | ||
return ok(views.html.index.render(request)); | ||
} | ||
|
||
public Result javascriptRoutes(final Http.Request request) { | ||
return ok( | ||
JavaScriptReverseRouter.create( | ||
"jsRoutes", | ||
"jQuery.ajax", | ||
request.host(), | ||
routes.javascript.JavaEventSourceController.streamClock() | ||
) | ||
).as("text/javascript"); | ||
} | ||
} |
21 changes: 0 additions & 21 deletions
21
play-java-streaming-example/app/controllers/HomeController.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@() | ||
@()(implicit request: JRequestHeader) | ||
|
||
@main { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters