Questions tagged [javascript]

JavaScript (not to be confused with Java) is a dynamic, weakly-typed language used for client-side as well as server-side scripting. Use this tag for questions regarding ECMAScript and its various dialects/implementations (excluding ActionScript and Google-Apps-Script). Unless another tag for a framework/library is also included, a pure JavaScript answer is expected.

Filter by
Sorted by
Tagged with
0 votes
0 answers
50 views

Proxy pass to express http server not working with secure websocket

So I currently have apache with a proxy pass which redirects all requests to an express api running using the http node module, I also have a letsencrypt ssl certificate installed and all is working ...
user avatar
  • 101
0 votes
0 answers
122 views

NodeJS Unable to connect to Websocket Cross origin - "Err 1006"

I have a two webservers both running https with the same certificates, I have a main shard that the user connects to example.com, they retrieve some data and try to connect to an ip address on the 2nd ...
user avatar
  • 1
0 votes
0 answers
374 views

How can I resolve "HTTP Error 500.19 error code 0x8007000d - Internal Server Error"?

I'm currently trying to redirect errors on my Tomcat project. Currently I'm using this method of redirecting the errors by using httpsError in the web.config file. Here is the code and error that I ...
user avatar
  • 1
0 votes
0 answers
38 views

Make webserver to prevent parsing of certain HTML elements

MediaWiki content management system creates many links which their webpages I want not to be discovered by search engine crawlers. It's not only that I don't want them indexed and more so not only ...
user avatar
0 votes
0 answers
18 views

How can I access the working information of a router on a remote server with Javascript and Node JS?

For my friends who want detailed information; The information I want to reach about the router is as follows; Heat, Device Connected Users, Signal Strength, Connection Speed, Device Uptime
user avatar
0 votes
1 answer
431 views

Unable to connect SQL Server from PHP using Windows Authentication

I'm trying to connect to MS-SQL Server from PHP-8.0 (hosting on IIS-10 localhost) using SQL Server Driver for PHP, i.e., SQLSRV-5.9. While connecting from a PHP page, if I use SQL Server ...
user avatar
0 votes
0 answers
188 views

CORS ERROR : "URL scheme "origin" is not supported." to fetch api

A 'CORS' error occurred while transmitting data from the client to the service. Therefore, "Access-Control-Allow-Origin" was added to the 'HTTP response header' to the IIS and to the WCF-Web....
user avatar
  • 1
0 votes
2 answers
2k views

PHP unable to identify sqlsrv_connect() function while trying to connect SQL Server

I'm trying to connect to my local MSSQL Server from a simple PHP file using the sqlsrv_connect() function, but every time I'm calling the file in the browser through localhost, it's throwing a 500 (...
user avatar
0 votes
0 answers
346 views

jQuery AJAX post method throws 405 (Method Not Allowed) error

I'm new in AJAX and have been learning the functions of jQuery get() and post() methods recently. While the get() method worked smoothly, I've faltered while coming across the post() method, that ...
user avatar
0 votes
0 answers
265 views

AWS Lambda error on build Node with Sharp Library

I have a problem to build my lambda handler. I'm trying to use sharp library to do an image resize on S3. My code: S3.getObject({ Bucket: bucketName, Key: objectKey }, (err, data) => { ...
user avatar
0 votes
0 answers
460 views

Nginx patch request ends up with Invalid CORS request

It's simple set up. Three docker containers in same network. ReactJs - production build on nginx server Spring Boot Mysql GET, POST request works like a charm but when i try to use PATCH request i ...
user avatar
  • 1
0 votes
1 answer
66 views

CORS prevent js window.onerror from subdomain reporting informations

To log Javascript errors i have set up a function with window.onerror which trigger an ajax request and inform me about script errors. I load all my static files from a subdomain and if an error ...
user avatar
  • 103
-1 votes
1 answer
40 views

Improve web page load time (JavaScript file server)

I am trying to improve how fast our corporate web pages load up/render. Part of the problem is a bunch of JavaScript files. If I put the JavaScript files, including the JavaScript files they each ...
user avatar
2 votes
1 answer
710 views

How to create a CSP nonce and yet continue website caching?

I am not getting any response to any way I try to phrase this question, so I keep trying. I feel I've got to be missing something, but I've searched and searched. Why isn't it obvious? Why is it so ...
user avatar
1 vote
0 answers
62 views

What is the solution to caching vs using a CSP nonce? I've been searching for a while, and haven't found it

I've never seen a good answer to this dilemma, and I've been searching high and low. It seems it is a choice between using a nonce and caching, you can't have both. Really bad choice! We're told '...
user avatar
0 votes
1 answer
53 views

Regular expression to find content that is sandwitched between 2 symbols

This might have been asked before but I cant find a solution. I am looking for a simple "Regular Expressions" search pattern to find something in my PHP files. I am looking for the following ...
user avatar
  • 31
0 votes
0 answers
5k views

WebSocket connection to 'wss:// failed: Error during WebSocket handshake: Unexpected response code: 404 on channels

I face this error while using channels for WebSockets on django production: WebSocket connection to 'wss://domain.me/ws/orders/confirm_all/' failed: Error during WebSocket handshake: Unexpected ...
user avatar
1 vote
0 answers
2k views

Socket.io error "Failed to load resource: net::ERR_CONNECTION_REFUSED" in Azure linux server

When opening this web page I get the following errors in the debug console: localhost:5005/socket.io/?EIO=3&transport=polling&t=NJKuQEf:1 Failed to load resource: net::ERR_CONNECTION_REFUSED ...
user avatar
4 votes
0 answers
2k views

List of all Permissions-Policy header keys and values?

Does someone have a list of all Permissions-Policy header keys and values? What I have: more_set_headers "Permissions-Policy: camera=(self), fullscreen=(*), geolocation=(self), payment=()"; ...
user avatar
  • 494
0 votes
1 answer
1k views

What is right syntax for nginx sub_filter directive when string has ambiguous characters?

I am trying to use sub_filter to replace pieces of this code in a .js file. SYNO.SDS.AzureSSOUtils = function() { var a = 600 , c = 500 , e = (screen.width / 2) - c / 2 , d = (...
user avatar
0 votes
0 answers
986 views

I can't start connection with WebSockets in EC2

I really need help with websockets, recently I used SSL(Let's Encrypt) in my website that is in ec2, and I used route 53 for routing, and the website works perfectly with SSL and my DNS, but I can't ...
user avatar
0 votes
0 answers
712 views

WebSocket connection timed out AWS EC2 + Ratchet PHP

I have a problem involving WebSockets, well, I have a website, and recently I put SSL on it, using Let's Encrypt, okay, SSL works perfectly, along with my website that is hosted on EC2, with a domain ...
user avatar
0 votes
1 answer
160 views

Correct Way to Install Node.js in a Multiuser Server? [duplicate]

I have to acknowledge being an old timer U*ix system administrator. Software to be used by everybody had two possible locations: /usr/bin /usr/local/bin The best example is gcc and family. Now I find ...
user avatar
0 votes
1 answer
91 views

What Prevents a Server Owned by a Non-Priviledged User to be Reached by Apache?

There is a popular Open Source application written in Javascript Node.js that listens to port localhost:1234 under my regular, non privileged account. When connecting from localhost everything works ...
user avatar
0 votes
1 answer
99 views

How can I "spy" on an Apache web server's response to server-side code like PHP or JavaScript?

I'm trying to debug a problem with a file upload strategy and don't know whether there's an issue with directory permissions / ownership or the scripts. ... I've tried both PHP and JavaScript and can'...
user avatar
  • 1,128
0 votes
0 answers
60 views

js files occasionally failing to load

We have a newly configured php7 16cpu 32gb RAM Linux server. Plenty of power for what we need. We have a basic form on a page that requires a login. However, sometimes when a user lands on the page, ...
user avatar
  • 1
-1 votes
2 answers
1k views

crypt(): No salt parameter was specified. You must use a randomly generated salt and a strong hash function to produce a secure hash function [closed]

I'm getting the following password error. I have PHP 7.2 variant(to php version 5.5 does not appear to me this problem ), the following code : function make_key($length) { $valid_chars = '...
user avatar
0 votes
1 answer
22 views

Capture client browser console using Shell and save it to a file

I want to find a way to capture a client browser console that is using my server, and save it to a file inside the server, is this possible using a shell script ?
user avatar
  • 99
0 votes
0 answers
27 views

How do I block site redirects from injections ads?

I have a site where I have various advertisements from a few advertiser , and from time to time my site is redirected how many other porn sites etc ... I installed anti adblock script because I gain ...
user avatar
2 votes
1 answer
870 views

Why must the XHR status be set before echoes in PHP?

Perhaps this question belongs on Stack Overflow or another site instead, in which case please tell me and don't just downvote; I will gladly move it. Anyway, I'm just learning the very basics of ...
user avatar
  • 123
1 vote
0 answers
1k views

CORS error despite CORS being enabled in app server and Nginx

I have a web application and server which is fully functional in a debugging environment, however when it's hosted for production, I get the following error in the browser console: Cross-Origin ...
user avatar
  • 111
0 votes
1 answer
188 views

Apache: No custom headers in environment variables

I've just installed a new webserver (Debian Buster, Apache, Dovecot, ISPConfig) to replace an old webserver. One of my websites uses custom request headers (through Javascript) to pass information to ...
user avatar
  • 155
0 votes
1 answer
51 views

Scheduled Copy Bigquery View/Query to Google Sheet

I have a BigQuery View/Query that every morning I need to run and copy the result to a Google Sheet. I am using Javascript, and plan to use the node.js BigQuery client library and the Google Sheets ...
user avatar
  • 111
0 votes
0 answers
63 views

How can I deploy a bookmarklet to users and restrict them from editing it?

I work for a large firm and have built a custom bookmarklet that certain users will soon be using for their work in IE11. From a sys admin perspective, is there a way I can configure the bookmarklet'...
user avatar
  • 1
1 vote
1 answer
862 views

Cloudfront disrupting authentication with JSON Web Token

Short version: my jwt token is not surviving a refresh when pointing to domain behind Cloudfront. Not sure if this is best posted here or on stackoverflow, but since I think I've isolated the problem ...
user avatar
2 votes
1 answer
210 views

Renaming the index.html on Google App Engine

Ok, let me 1st come clean. I mistakenly added a 365d expiration date to my index.html file. I've now made a change to a JS file, which changed the name of the import in my index.html and now it's ...
user avatar
1 vote
0 answers
35 views

How to add Google TPU to javascript coded web application at AWS?

Edit; I think I just realized that what they are selling is not an add on item to your existing web application, but that they want you to use their servers(instead of AWS), and are implying that ...
user avatar
1 vote
1 answer
50 views

Why is upload way faster and more alternating in speed than download on local machine

I am writing a speed test to determine browser-server connection speed (js+php but I don't think it matters). I send a bunch of data-packages in different sizes and measure the time they need to reach ...
user avatar
  • 163
0 votes
2 answers
340 views

Check if a remote machine is running

I want to connect to 2 machines remotely. For doing that I should first make sure that both the machines are running. One way to do this is by using ping which might not work sometimes because of the ...
user avatar
  • 1
-2 votes
1 answer
273 views

Error while connecting to MongoDB database

I'm getting this error which I never used to get before. I haven't changed any code, and I am suddenly getting this weird error and it won't do anything but spit out this error (it won't do the code I ...
user avatar
  • 1
0 votes
1 answer
21 views

Get javascript load calling stack

Is there some tool that will give me a load stack of the javascript files our web site loads? Our page is slow because of some javascript files load times being slow, but they're not file we're ...
user avatar
1 vote
1 answer
2k views

nginx set different document root for a proxypass

I'm just trying to run a nodejs app I made on a proxypass domain, and have it work exactly as it did on my desktop. However, for some reason, even though I defined a seperate document root for this ...
user avatar
  • 127
2 votes
1 answer
9k views

nginx connection refused while connecting to upstream

I have a server on which I've deployed an API (Sinatra). I run that API on port 9292 and proxy requests to it. I also need to deploy a static javascript file and its supporting resources. I do that ...
user avatar
  • 481
0 votes
1 answer
25 views

how to point parts of a single url to 2 different servers using nginx

I have pointed a location /tanya to an address http://52.221.238.24/tanya;, I also want /tanya/t/ to point to the same IP. However, I need to point /tanya/dynamically_generated to point to another IP ...
user avatar
0 votes
1 answer
634 views

web page linked JS and CSS files download as Chinese characters

This is a weird one. I have devised a minimal web page http://localhost/Default.htm on a Windows 10 IIS server that demonstrates the error. <!DOCTYPE html> <html> <head> <...
user avatar
1 vote
0 answers
4k views

nginx reverse proxy Nodejs - 404 not found

I have a simple NodeJS application that needs to display a few webpages. I have the Node app running at http://localhost:3100 and want to use an NGINX Reverse Proxy to allow users access to the app ...
user avatar
0 votes
2 answers
391 views

Microsoft VBScript compilation error '800a0408'. IIS ASP Javascript serving error

I have a server with IIS 6.1 In a Windows Server 2008 which is serving an ASP web site, the page is running OK, and the javascript is being served correctly as you can see here. But in another ...
user avatar
  • 1
4 votes
0 answers
12k views

How to Enable JavaScript for wget in linux for grabbing a website?

I use wget like this for save site : wget --page-requisites --no-parent --mirror http://example.com/index.html -P /home/ in Some cases It does NOT work, Error is : This site requires Javascript to ...
user avatar
2 votes
2 answers
1k views

Proxy website that uses javascript to change window.location?

Little bit of a newb when it comes to configuring httpd but here's my situation: I'm trying to proxy an application (let's call it catsapp) that I have no control over with httpd. catsapp, an html/...
user avatar
  • 530
0 votes
1 answer
1k views

IIS 7.5 not able to server Javascript file, throws 500 error.

I have a site sitting on IIS 7.5. There are numerous JavaScript files that are being served from a scripts folder. Most of those files are served properly but there is one file that causes IIS to ...
user avatar
  • 115