Cant read cookies from custom dev domain - laravel

I want to work locally and I've set in the hosts file
127.0.0.1 dev.domain.com
the dev.domain.com subdomain is not set in the nginx config on the live server, only in my local hosts file
I've started the dev server (webpack) with self signed ssl and made the certificate as trusted, so now it appears with green in the browser bar as a Valid certificate would
So now I'm viewing the locally runned app on https://dev.domain.com and I see all the cookies from www.domain.com and .domain.com in chrome devtools
The problem is that when I do an ajax call and dump the cookies from php, none of them appear for dev.domain.com but all appear for www.domain.com

Related

Moodle 3.9.19 http-https redirect problem, how to solve it?

I upgraded my moodle from 3.7 to 3.9.19 version. Now web clients can't download any file. I checked what causes an error. On web browser it shows Mixed Content
Mixed Content: The site at '' was loaded over a secure connection, but the file at '' was redirected through an insecure connection. This file should be served over HTTPS. This download has been blocked. See for more details.
Mixed Content: The site at 'https://mysite/' was loaded over a secure connection, but the file at 'https://mysite/pluginfile.php/26397/mod_resource/content/0/Bug.balans%20forma%201.xls' was redirected through an insecure connection. This file should be served over HTTPS. This download has been blocked. See https://blog.chromium.org/2020/02/protecting-users-from-insecure.html for more details.
After upgrading, all web clients entering to my site with https. But i never installed ssl certificate in my server. Inside the server, site is working as http. Before update it was normal.
Windows Server 2012R. Mariadb 10.6.11. HeidiSQL 11.3.0.6295. PHP Version 7.4.1. Moodle 3.9.19 IIS 8
I tryed to redirect https to http. It was useless

webmail.example.com throws 404 for HTTPS only on hosted server

I have a several web sites running on a shared hosted server.
Every site except one I can enter in my browser https://webmail.example.com or http://webmail.example.com and they both work and resolve to the secure or insecure pages accordingly.
On the one site the page resolves correctly for regular http but I get a "404 Not found" error when I try https for the webmail subdomain of that site. https://myexample.com does work for all pages on that site (without the webmail subdomain).
All of the DNS settings are the same for all of the sites. There is a CNAME record webmail.example.com --> examplecom. None of the sites have a "proper" subdomain setup where the subdoman points to a directory, just the DNS setting. The SSL Status reports that the SSL cert for the webmail subdomain is valid.
Im not sure what else to check or how webmail ultimately get pointed to the webmail page.

SSL and Umbraco

I am trying to get SSL working on a Windows server that is hosting our Umbraco sites. We have numerous sites all working within the same Umbraco installation and I have done the binding of the main domain to the SSL certificate on the server and set umbracoUseSSL to true. I have also added the domain with the https part to the culture and hostnames in umbraco.
The above is not working when I type my domain with the https?
My question is since I have not placed a UrlReWrite redirect from http to https is this the reason why I cannot see my website with the https or is it to do with something else?

Cloudflare SSL Issues with Heroku

I have a heroku app running on app.domain.com
I have a different app (strikingly landing page) running on www.domain.com
I turned on cloudflare for my domain.com and want to get SSL working. I've tried the flexible SSL cert.
However, when I request https, I get SSL errors (curl -I gives no alternative certificate subject name matches target host name).
The SSL cert appears to say "Active" on my Cloudflare console, and I've set up Page Routing for http://domain.com to Always use HTTPs
On the DNS page of Cloudflare, I hit the orange icon on the row for www and app to have them "enabled" but then I just get Invalid URL The requested URL "[no URL], is invalid." when hitting the site.

Response Cookie not getting set by Chrome & IE

I'm trying to figure out why Chrome (26.0.1410.64) and IE10 don't seem to recognize the cookie I set in my response from an ASP.NET Web API controller. Here is the situation:
I have a drop-down menu login form on my page that makes an ajax call to my Web API method (via HTTP POST) and that Web API method returns some JSON data and also sets a cookie in the response (using the HTTP headers). It works perfectly in Firefox and Safari (so, WebKit) but not in Chrome or IE. Chrome and IE appear to completely ignore the cookie that's sent back in the response. I've verified (using Fiddler) that the cookie is sent back on the response so I know it's there - I can't figure out why IE10 and Chrome don't pick it up though.
Any ideas? Does it have something to do with how Chrome and IE10 handle response cookies in ajax requests?
So I figured out the issue, although it's not something I really would like to accept as a solution. I guess I will just have to deal with it and always test the site on my local machine using Firefox.
So here's the issue:
When I run my site locally by running it from Visual Studio and IIS on my local machine, it creates a website at an address like http://localhost:1839/. For some reason, ajax cookies get ignored by IE10 and Chrome when it's "localhost" - but not when it's a real-looking host name or IP Address. So if I edit my host file and create a generic entry like localhost.com and point it at 127.0.0.1:1839 then everything works fine in IE and Chrome (and Firefox still as well).
It's when I use the localhost:1839 address that ajax cookie only works in Firefox.
So what I ended up doing was deploying my website to a different test IIS server (on another machine) that I have a test.mydomain.com entry in my local host file for - that points to the test IIS server's IP address. Now IE, Chrome and Firefox all accept the ajax cookie from this faked "test.mydomain.com" domain.
So for those of you sending cookies back on an ajax request - beware of this "localhost" issue with Chrome and IE.
The Domain on the set cookie is most likely conflicting against using localhost. If you edit your hosts file and add a alias it will make test.mydomain.com point to your local machine:
Within c:\windows\System32\drivers\etc\hosts add the following:
127.0.0.1 test.mydomain.com
Start your webserver within Visual Studio
Close all browsers, then load test.mydomain.com

Resources