herokuapp.com redirects twice unexpectedly to www.app.com
up vote
0
down vote
favorite
my uni group are working for a client, and we have a Heroku app set up to handle the server side of things. I'm currently working on an AJAX login function, but I am redirected automatically - and that's the problem: there isn't supposed to be any redirect. It's coming from Heroku, not our code.
Our Heroku as a REST API returns exclusively JSON perfectly fine, using the URL https://blah.herokuapp.com/
(200), until I send an AJAX request via JS or JQuery: it redirects to https://blah.heroku.app.com/
(301), which redirects to www.app.com
(200).
When you try to access that second one with the extra .
, it redirects straight to www.app.com
, which is how I know that it's Heroku. Edit: I tested someone elses Heroku app, and it does the same thing when you add the extra .
.
I'm at a loss as to why it redirects to the second one, or why Heroku redirects to a dodgy site. Any ideas?
heroku
add a comment |
up vote
0
down vote
favorite
my uni group are working for a client, and we have a Heroku app set up to handle the server side of things. I'm currently working on an AJAX login function, but I am redirected automatically - and that's the problem: there isn't supposed to be any redirect. It's coming from Heroku, not our code.
Our Heroku as a REST API returns exclusively JSON perfectly fine, using the URL https://blah.herokuapp.com/
(200), until I send an AJAX request via JS or JQuery: it redirects to https://blah.heroku.app.com/
(301), which redirects to www.app.com
(200).
When you try to access that second one with the extra .
, it redirects straight to www.app.com
, which is how I know that it's Heroku. Edit: I tested someone elses Heroku app, and it does the same thing when you add the extra .
.
I'm at a loss as to why it redirects to the second one, or why Heroku redirects to a dodgy site. Any ideas?
heroku
Turns out that app.com is the top level domain. So the extra period is cutting off the heroku and appname. So that's how we end up at www.app.com.
– Scruffy
yesterday
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
my uni group are working for a client, and we have a Heroku app set up to handle the server side of things. I'm currently working on an AJAX login function, but I am redirected automatically - and that's the problem: there isn't supposed to be any redirect. It's coming from Heroku, not our code.
Our Heroku as a REST API returns exclusively JSON perfectly fine, using the URL https://blah.herokuapp.com/
(200), until I send an AJAX request via JS or JQuery: it redirects to https://blah.heroku.app.com/
(301), which redirects to www.app.com
(200).
When you try to access that second one with the extra .
, it redirects straight to www.app.com
, which is how I know that it's Heroku. Edit: I tested someone elses Heroku app, and it does the same thing when you add the extra .
.
I'm at a loss as to why it redirects to the second one, or why Heroku redirects to a dodgy site. Any ideas?
heroku
my uni group are working for a client, and we have a Heroku app set up to handle the server side of things. I'm currently working on an AJAX login function, but I am redirected automatically - and that's the problem: there isn't supposed to be any redirect. It's coming from Heroku, not our code.
Our Heroku as a REST API returns exclusively JSON perfectly fine, using the URL https://blah.herokuapp.com/
(200), until I send an AJAX request via JS or JQuery: it redirects to https://blah.heroku.app.com/
(301), which redirects to www.app.com
(200).
When you try to access that second one with the extra .
, it redirects straight to www.app.com
, which is how I know that it's Heroku. Edit: I tested someone elses Heroku app, and it does the same thing when you add the extra .
.
I'm at a loss as to why it redirects to the second one, or why Heroku redirects to a dodgy site. Any ideas?
heroku
heroku
edited yesterday
asked yesterday
Scruffy
13
13
Turns out that app.com is the top level domain. So the extra period is cutting off the heroku and appname. So that's how we end up at www.app.com.
– Scruffy
yesterday
add a comment |
Turns out that app.com is the top level domain. So the extra period is cutting off the heroku and appname. So that's how we end up at www.app.com.
– Scruffy
yesterday
Turns out that app.com is the top level domain. So the extra period is cutting off the heroku and appname. So that's how we end up at www.app.com.
– Scruffy
yesterday
Turns out that app.com is the top level domain. So the extra period is cutting off the heroku and appname. So that's how we end up at www.app.com.
– Scruffy
yesterday
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53204306%2fherokuapp-com-redirects-twice-unexpectedly-to-www-app-com%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Turns out that app.com is the top level domain. So the extra period is cutting off the heroku and appname. So that's how we end up at www.app.com.
– Scruffy
yesterday