Laravel Angular project setup on heroku cookie issue - cookies

I have setup this two app to work together
https://admin-angular-app.herokuapp.com/login (Angular App)
https://lara-admin-999.herokuapp.com/ (Laravel App)
Now when I run the angular app due to subdomain cookies it is not working as expected.
How I set the cookies so that it works for both.
I tried to set cookies on herokuapp.com but it not worked please suggest what I should do about it.

Related

My Django App only works on heroku when server is running locally

I have built an app using react and django. After deploying the app on heroku, when I open it the frontend works fine. However when i try to do any action that sends requests to the backend I get errors. The only time the requests work fine is when the django backend is running locally. I hsve been looking allover for solutions and have not been able to find any solutions. In my settings.py The heroku domain name is added to the allowed hosts
ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'barkbnb-demo.herokuapp.com']
If anyone can point me in the right direction on where to begin looking for solving the issue that would be greatly appreciated.
Thanks!
Check your request string in React app when you call your backend. It looks like it uses local address there.

Dokku: Need some guidance in serving frontend (vue) and backend (django, drf)

I recently moved over to using Dokku and am wondering if someone can help me out with this. I am trying to run Vue and Django on a Linode server. Currently I have Django serving at my IP. Looks like in nginx, that port 80 is being listened to and Django is being served at /. I'd like to move Django to either be served at ':8000' as it is on my local machine or to be served at '/backend'. Then I'd like to serve Vue the way Django is currently being served () and it can hit the api at either previously mentioned Django location.
I ended up just throwing Vue up on netlify and that worked great.

All routes doesn't works after deploying ember app

I am creating one ember app. The app is working fine while running on development server (using ember serve), but when i build my app using ember build -prod and deploy it on my server which is apache, just index route works and nothing else.
This is understandable as only index path is physical but i am not finding any way to get this done.
Is there any documentation on build process which can enable all routes?
This is not something EmberJS can fix through the build process. You need to change your server's configuration.
Apache's mod_dir has a "Fallback resource" directive you need to activate for your website since the JavaScript router URLs are not pointing to actual files or folders.
Add this directive in the VirtualHost entry:
FallbackResource /index.html
See this related answer

How to set up Django app to make cookies work on subdomain

I have deployed my application on subdomain.domain.com (it works only on that one subdomain). Everything works fine except the fact that from time to time users cannot log in to application (the message "Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again" is shown when trying to log into admin panel). I've noticed that restarting the web server eliminates this problem for some time.
Does anyone have experience with setting up django project on subdomain and can guide me how to configure my application to make it work correctly without need to ocasionally make reset?
I'd tried to set up SESSION_COOKIE_DOMAIN = 'subdomain.domain.com' setting but it didn't solve the problem (maybe I set it wrong?)
I use Django 1.1.1, Python 2.5.4 for this project. Project is deployed in provider I use for other projects and cookies works there perfectly. Other projects run also on subdomains and do not have SESSION_COOKIE_DOMAIN set at all.
in your settings do you have SESSION_COOKIE_DOMAIN set? If so, is it set to something that isn't the domain the site is operating on?

loading gwt app from django

I am trying to load a google web toolkit application with django, but the gwt host page does not seem to work (just a blank screen) when I invoke it with render_to_response() from my django view. I have verified that a plain hello-world html file loads fine from the gwt war directory, so it's not a path issue. Also the host page renders if I manually open it in a browser. I am running my django app in development mode using manage.py runserver. Any ideas?
When you say you've tried it manually within the browser - is that over HTTP or file:///
Does sound like a path issue, TBH. Have a look in Safari or Firebug to see the HTTP activity when the host page loads. The 'nocache' JS file you include the in the host page loads the appropriate compiled JS for that user agent. Maybe it can't find JS.