Homestead on Chrome 62 - laravel

I have set in my homestead yaml file my mapped url for my local machine to view my Homestead website. However it does not connect with chrome 62 but works with other browsers. Chrome 62 gives a connection refused error.
Can anyone suggest why?

That's because the .app and .dev domains are added to the HSTS list.
You can visit the error page, type "badidea" on your keyboard and then de site will load.

Related

Cannot set secure cookie in firefox 90.02 or 78.13.0esr, using tornado 6.1.0.0, python 3.73. Ok in chrome, edge etc

I have a local web server application (self signed certificate) that has stopped working in firefox (both windows and linux). It does not set any secure cookies. The following test code only sets cookie test2. The application behaves fine in chrome and edge with all cookies being set and has previously worked in firefox. My searches have not turned up anything, other than an issue marked as fixed bugzilla 1618113. Setting an exception for the ip address to allow cookies does not fix this.
Further checking on an older platform shows that the secure cookie is set correctly using tornado 3.2.2.0 and python 3.4.2.
settings_ssl = {
"cookie_secret": cookie_secret,
"login_url": "/login",
"static_path": "/var/www",
"template_path": "/home/pi/py/web",
"default_handler_class": ErrorHandler,
"default_handler_args": dict(status_code=404),
}
self.set_secure_cookie("test1","cookie_secure")
self.set_cookie("test2","cookie_insecure")
Any help gratefully received.
Images added in edit:
Cookies set in Firefox
Cookies et in Chrome by same code
Thanks to bigpangl. I can no longer see the comments we both posted between Aug 12 and yesterday, however checking the POST data led me to discover that, on firefox, the expiry time of the cookie appears to be set based on the time of the server. It appears to be calculated based on the time of the browsing computer when using chrome.
My local server time was 61 days in the past, so the default expires_days value of 30 in tornado meant that the cookie expired in the past and was not stored on firefox.

Why does localtunnel not work when there is a redirect defined for a route in Laravel?

These devices are all on the same LAN:
Ubuntu server
Win 10 PC
iPhone
Android
On the Ubuntu server, the /etc/hosts file has:
127.0.0.1 rcw.lt
Also on the Ubuntu server, there is a Laravel app hosted by nginx: server_name rcw.lt;.
The / homepage route of my rcw.lt app uses a redirect (see https://laravel.com/docs/8.x/redirects and https://laravel.com/docs/8.x/helpers#method-redirect).
I run lt --port 80 --local-host rcw.lt &.
What does NOT work:
When browsing from Win 10 or iPhone or Android to the URL generated for the rcw.lt app (such as https://fat-tiger-93.loca.lt), it always tries to redirect to https://rcw.lt (and says ERR_CONNECTION_REFUSED).
What works:
I can browse to the provided generated URL and append a specific path onto it (such as https://fat-tiger-93.loca.lt/some-specific-route), and it works. Or I can remove the redirect from the / route (which I don't want to do).
Any ideas?
Is this a problem with how Laravel redirects work? Or a problem with localtunnel? Is there a workaround?
I really appreciate your help. :-)

localhost refuses to connect - ERR_CONNECTION_REFUSED

I have a simple MVC web application where javascript code sends ajax requests to the controller and the controller sends back responses.
I built the app 2 years ago and everything used to work fine. Now I tried to run the app again locally and met with the following problem:
whenever an Ajax request is sent from the frontend to the controller (running on localhost), the localhost refuses to connect and I get an ERR_CONNECTION_REFUSED message in (chrome's) javascript-console. (In Safari's javascript-console I get the following error message: "Failed to load resource: Could not connect to the server.")
I'm running the app using NetBeans 11.2. My NetBeans IDE uses GlassFish as server:
I removed the Glassfish server from NetBeans IDE, deleted its folder in my home directory and then added the Glassfish server again in my NetBeans IDE (which also entailed downloading the the newest version of the Glassfish server).
Still, the server refuses to accept any requests from the frontend.
I also tried using Payara Server (version 5.193). That didn't make a difference either.
The frontend itself looks fine at first glance by the way. That is, going to http://localhost:8080/myapp loads the frontend of the app. However, any dynamic features of the app don't work because the server refuses to accept any Ajax requests coming from the frontend (and initiated through mouse clicks).
How can I fix this?
I think I found the reason for the problem:
In my javascript-file I have the following line of code:
var url = "http://localhost:8080/myapp/Controller";
The variable "url" is passed to all the AJAX requests sent to localhost.
But here is the crazy thing: the AJAX requests are not sent to "http://localhost:8080/myapp/Controller" but to "http://localhost:8081/myapp/Controller" !!!!!
What the hell is going on here?!
Did you use port 8081 before and then changed the variable "url" to the new port 8080? In this case, maybe the variable is still set to the old value in the cache. Restart your computer and see whether this fixes the problem.
If the value of the attribute http-listener is localhost, it will refuse the connection external connection.
You can verify using its value using the command
asadmin> get server-config.network-config.network-listeners.network-listener.http-listener-1.*
Information similar to the following should returned:
server.http-service.http-listener.http-listener-1.acceptor-threads = 1
server.http-service.http-listener.http-listener-1.address = 0.0.0.0
server.http-service.http-listener.http-listener-1.blocking-enabled = false
server.http-service.http-listener.http-listener-1.default-virtual-server = server
server.http-service.http-listener.http-listener-1.enabled = true
server.http-service.http-listener.http-listener-1.external-port =
server.http-service.http-listener.http-listener-1.family = inet
server.http-service.http-listener.http-listener-1.id = http-listener-1
server.http-service.http-listener.http-listener-1.port = 8080
server.http-service.http-listener.http-listener-1.redirect-port =
server.http-service.http-listener.http-listener-1.security-enabled = false
server.http-service.http-listener.http-listener-1.server-name =
server.http-service.http-listener.http-listener-1.xpowered-by = true
Modify an attribute by using the set subcommand.
This example sets the address attribute of http-listener-1 to 0.0.0.0:
asadmin> set server.http-service.http-listener.http-listener-1.address = 0.0.0.0
Reference:
https://docs.oracle.com/cd/E19798-01/821-1751/ablaq/index.html

Cloudinary image goes 401 unauthorized on firefox when using modifiers in url

I have this image uploaded on cloudinary:
http://res.cloudinary.com/sylvain-bigonneau/image/upload/v1441562225/fvlmjerhn7vcli4hkbvx.jpg
It loads fine on every browser. But if I want to use modifiers in the url, such as:
http://res.cloudinary.com/sylvain-bigonneau/image/upload/c_fit,f_auto,h_590,w_768/v1441562225/fvlmjerhn7vcli4hkbvx.jpg
It loads fine on Chrome, but I get a 401 Unauthorized error when opening it on Firefox.
Is there some way I can fix this?
I am using Firefox 40.0.3 on Linux Mint 17.

Phonegap - Origin http://localhost is not allowed by Access-Control-Allow-Origin

Im creating a mobile app with Phonegap and Backbone.js. My app hits a url which returns an rss feed in xml format and this is to be loaded into the Backbone connection. However I am getting the error:
Origin http://localhost is not allowed by Access-Control-Allow-Origin.
In my res/xml/config.xml I have the line:
<access origin="*"/>
The phonegap docs at http://docs.phonegap.com/en/1.9.0/guide_whitelist_index.md.html, state that this should stop this type of error, but it's not.
I'm testing from localhost on a desktop browser. Could this be the issue?
Put his in your top in your PHP file that you make the request to:
header('Access-Control-Allow-Origin: *');
I take it that you use php :)
if now please say which language :)
I was testing in a browser, the whitelist in res/xml/config.xml only works on a mobile device.

Resources