DrupalGap icon indicating copy to clipboard operation
DrupalGap copied to clipboard

Web-app setup into subdomain

Open ghost opened this issue 9 years ago • 12 comments

May can i setup a web-app into separate or subdomain?

ghost avatar Oct 09 '16 04:10 ghost

@tazimhossain You'll need to enable CORS for Drupal.

signalpoint avatar Oct 09 '16 18:10 signalpoint

I have enabled CORS and connect successfully, but when I enter username and password, its not login. any idea?

ghost avatar Oct 10 '16 05:10 ghost

@tazimhossain You need to use Chrome's developer tools and monitor the JavaScript console log, and the Network tab for more information. Please report relevant log messages, and network status information here for further assistance.

signalpoint avatar Oct 10 '16 05:10 signalpoint

@signalpoint thanx for quick reply. I have no error, but when I try to login after disable chrome cors security, i can login fine. But, when i trying to login normally- its not login.

I attached an image with login and network status. screenshot-override

For inform you. I added this codes into my conf file for avoid cors problem Header always set Access-Control-Allow-Origin "*" Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT" Header always set Access-Control-Allow-Headers "Content-Type, X-CSRF-Token, origin, accept"

I skip this "http://docs.drupalgap.org/7/Developer_Guide/CORS" step.

Sorry for hiding my domain name... :)

ghost avatar Oct 10 '16 06:10 ghost

Hey @signalpoint, any ideas? Please, i need help.

ghost avatar Oct 12 '16 04:10 ghost

@tazimhossain Nope, sorry. This is why I've always placed apps in the same domain as the Drupal site.

signalpoint avatar Oct 12 '16 12:10 signalpoint

@signalpoint, Hmm... ok...

One more question, have any way to develop drupalgap app without jquery mobile? I like to use angular to develop my apps.

thank you. :)

ghost avatar Oct 12 '16 13:10 ghost

@tazimhossain DrupalGap 7 no, DrupalGap 8 yes.

DG8 is itself headless and let's you pick frameworks to put on top of it, e.g. Angular, Bootstrap, etc. : http://demo.drupalgap.org/8/

jDrupal however is great for Drupal 7 and Drupal 8 and any JavaScript/CSS frameworks: http://jdrupal.tfrankenstein.com/

signalpoint avatar Oct 12 '16 13:10 signalpoint

@signalpoint how r u? Is subdomain login support with drupal 8?

ghost avatar Oct 26 '16 06:10 ghost

@tazimhossain Subdomain support is possible on Drupal 7 and 8. You just need to configure the CORS policy properly on your server, and within your app's index.html file. Although I have never tried either in a subdomain, but I know others have done it.

signalpoint avatar Oct 26 '16 12:10 signalpoint

@signalpoint sorry for ask you again. I am trying hard for doing support subdomain authentication for my projects. But, i can't figure it out. Can you please help me to do that? or any docs for solve my problem?

Thanx. :(

ghost avatar Oct 27 '16 03:10 ghost

@tazimhossain There are no docs on this issue as far as I know. People have tried the sub domain approach, I never had any luck with it, many have asked about it, etc, so there will be many issues in the various issue queues talking about the situation. Maybe try the "cookie domain" technique that I think is available via a settings.php config.

signalpoint avatar Oct 27 '16 13:10 signalpoint