File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ export default Ember.NoneLocation.extend({
3737 if ( isTransitioning && ! isInitialPath ) {
3838 let protocol = get ( this , '_request.protocol' ) ;
3939 let host = get ( this , '_request.host' ) ;
40+ let rootURL = get ( this , 'rootURL' ) ;
41+ rootURL = rootURL . substr ( 0 , rootURL . length - 1 ) ;
42+ path = `${ rootURL } ${ path } ` ;
4043 let redirectURL = `${ protocol } ://${ host } ${ path } ` ;
4144
4245 response . statusCode = this . get ( '_redirectCode' ) ;
Original file line number Diff line number Diff line change @@ -72,10 +72,10 @@ describe('FastBootLocation', function () {
7272 'location' ,
7373 'x-fastboot-path'
7474 ] ) ;
75- expect ( response . headers . location ) . to . equal ( 'http://localhost:49741/test-passed' ) ;
76- expect ( response . headers [ 'x-fastboot-path' ] ) . to . equal ( '/test-passed' ) ;
75+ expect ( response . headers . location ) . to . equal ( 'http://localhost:49741/my-root/ test-passed' ) ;
76+ expect ( response . headers [ 'x-fastboot-path' ] ) . to . equal ( '/my-root/ test-passed' ) ;
7777 expect ( response . body ) . to . contain ( 'Redirecting to' ) ;
78- expect ( response . body ) . to . contain ( '/test-passed' ) ;
78+ expect ( response . body ) . to . contain ( '/my-root/ test-passed' ) ;
7979 } ) ;
8080 } ) ;
8181
@@ -92,10 +92,10 @@ describe('FastBootLocation', function () {
9292 'location' ,
9393 'x-fastboot-path'
9494 ] ) ;
95- expect ( response . headers . location ) . to . equal ( 'http://localhost:49741/test-passed' ) ;
96- expect ( response . headers [ 'x-fastboot-path' ] ) . to . equal ( '/test-passed' ) ;
95+ expect ( response . headers . location ) . to . equal ( 'http://localhost:49741/my-root/ test-passed' ) ;
96+ expect ( response . headers [ 'x-fastboot-path' ] ) . to . equal ( '/my-root/ test-passed' ) ;
9797 expect ( response . body ) . to . contain ( 'Redirecting to' ) ;
98- expect ( response . body ) . to . contain ( '/test-passed' ) ;
98+ expect ( response . body ) . to . contain ( '/my-root/ test-passed' ) ;
9999 } ) ;
100100 } ) ;
101101} ) ;
You can’t perform that action at this time.
0 commit comments