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
20 votes
4 answers
39k views

How do I configure Nginx proxy_pass Node.js HTTP server via UNIX socket?

I am trying to configure a Nginx server to connect to a Node.js HTTP server via a UNIX domain socket. The Nginx configuration file: server { listen 80; location / { proxy_pass http://unix:/...
0 votes
0 answers
9 views

How to fetch all files totally from MonGo DB using query without any filtering in NestJs

Tried with different codes , but not able to fetch all the files from MongoDB
0 votes
0 answers
17 views

Issue with payment for using API Key (Maps JavaScript API) on my Website

English translation: Subject: Issue with payment for using API Key (Maps JavaScript API) on my Website Content: I am currently having an issue with the payment for using the API Key (Maps JavaScript ...
0 votes
0 answers
55 views

wordpress mixed content error - Is resolution on GCP possible?

I have a python flask-cors code that is run on GCP compute engine and presents its output on port 3001. Lets say the physical address of my server instance is x1.x2.x3.x4. I have a Javascript file ...
3 votes
1 answer
321 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 '...
-1 votes
1 answer
334 views

ASP.Net: Problems loading WebResource.axd

(See also IIS - Ajax Problems when migrating to Windows Server 2022 and https://stackoverflow.com/questions/77523244/ajax-problems-when-migrating-to-windows-server-2022?noredirect=1#...
1 vote
1 answer
4k views

Nginx - Even after adding the directive 'access control allow origin' the request logs error

I am trying to run nginx infront of my nodejs application (I am using windows machine) My NodeJS Application is running in 3000 port I have started the Nginx at 8070 port When i try to hit http://...
0 votes
2 answers
238 views

telnet to port 80 (nginx), with forward to apache2 at port 8080, fails with 'connection closed by foreign host' and no explanations seemingly anywhere

i'm running an Kubuntu 22.04 server, and want to shuttle LAN-only traffic from port 80, served as far as i can tell by nginx, to port 8080 served by apache2 (for PHP purposes). but i'm getting this &...
0 votes
0 answers
100 views

Stripe Custom PHP & JavaScript Stripe Integrations: form refuses to load

I'm attempting to create a webpage for my startup, which is subscription-based. We have Stripe in live mode, and are essentially storing cards for future use, allowing us to have different payment ...
0 votes
1 answer
497 views

AWS (SES + API Gateway) + HTML Form fails. Error is: InvalidParameterValue: Missing final '@domain'

I'm trying to set up a contact form on my site, I feel I am close but there is something funky going on with the source address value. I'm passing the data as URL encoded instead of multipart as I ...
0 votes
1 answer
393 views

Getting 404 on a specific path /pricing with Apache server

I've set up an Apache server on Ubuntu 20.04 The site loads fine when I load the home page first (https://leadzilla.ai) and after that when I click on the pricing button and it takes me to https://...
1 vote
0 answers
731 views

nginx: Uncaught (in promise) ChunkLoadError: Loading chunk

I installed Sentry self-hosted 23.1.1, and configured nginx/1.22.1 as frontend proxy. If I access the Docker port, Sentry loads fine, while if I pass through nginx I get the error in the subject. It ...
1 vote
0 answers
36 views

Structuring and serving files after a build

So this is my first self-hosted site and server, so go easy on me please! XD I've been developing locally using webpack and vanillajs. My server is hosted on digitalocean with ubuntu. I build locally, ...
3 votes
3 answers
20k views

IE8 script error 800704a6?

We have a user who suddenly started getting the following error when trying to open some web apps using window.open from within an embedded web browser in our software The script uses javascript's ...
1 vote
1 answer
3k views

IIS: requesting PNG returns 401

I am attempting to create a web application, and I am testing it on my desktop using IIS. My problem comes whenever I attempt to request a PNG image. The server responds with a 401 specifically for ...
0 votes
1 answer
2k 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 ...
3 votes
1 answer
2k views

GZip compression not working on Tomcat7

I recently tried using gzip compression to improve web UI performance. I configured Tomcat Connector as below. compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" ...
2 votes
1 answer
1k views

IIS 7.5 Not Compressing Javascript: NO_MATCHING_CONTENT_TYPE

I have IIS 7.5 set to compress all static files (the default), yet it does not compress .js (javascript) files. When I turn on failed request tracing for compression, the error I get for the ...
1 vote
0 answers
34 views

Does javascript on the front end require a javascript hosting?

I have a few javascript in my code which help with image slider, I also have an external file I connected to the HTML file which helps with scrolling up. It's all on the front-end, do I need to ...
0 votes
1 answer
934 views

How to append into next line in Windows batch file

I am using a windows batch file that will output a .js file into csv. The .js file is a mongo query. mongosh --host 10.1.0.1:27017 --username "username" --password "password" --...
0 votes
1 answer
44 views

Is include() cached with fastcgi?

I have a script like this script.php <?php include "data/package.php"; echo $package[0]["name"]; echo "Hello World"; ?> and i do cache false with this map $...
0 votes
1 answer
2k views

How to configure .htaccess to run JavaScript with node as CGI

I'm testing this on my linux localhost. This is what I'm trying: balter@spectre:/var/www/html$ cat .htaccess Action cgi-node "/usr/bin/env node" AddHandler cgi-node .js balter@spectre:/var/www/html$...
0 votes
0 answers
4k 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 ...
0 votes
0 answers
94 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 ...
4 votes
0 answers
3k 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=()"; ...
1 vote
1 answer
1k views

Cross domain javascript form filling, reverse proxy

I need a javascript form filler that can bypass the 'same origin policy' most modern browsers implement. I made a script that opens the desired website/form in a new browser. With the handler, ...
0 votes
1 answer
2k 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 ...
0 votes
2 answers
21k 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 (...
2 votes
1 answer
3k views

CSP nginx nonce

I have some problems with adding CSP to my site. I configured Content-Security-Policy-Report-Only in my nginx configuration. And i get this. adsbygoogle.js:37 [Report Only] Refused to apply inline ...
0 votes
0 answers
614 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) => { ...
0 votes
3 answers
3k views

proxy.pac file performance optimization

I reroute certain websites through a proxy with a proxy.pac file. It basically looks like this: if (shExpMatch(host, "www.youtube.com")) { return "PROXY proxy.domain.tld:8080; DIRECT" } if (...
0 votes
1 answer
648 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 ...
4 votes
1 answer
3k 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 ...
-1 votes
1 answer
185 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 ...
-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 = '...
0 votes
1 answer
66 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 ...
0 votes
0 answers
6k 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 ...
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 ...
0 votes
1 answer
4k 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 = (...
0 votes
0 answers
2k 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 ...
0 votes
0 answers
982 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 ...
0 votes
1 answer
99 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 ...
0 votes
1 answer
823 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 ...
0 votes
1 answer
166 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'...
0 votes
0 answers
200 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, ...
0 votes
1 answer
37 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 ?
0 votes
0 answers
41 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 ...
2 votes
1 answer
2k 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 ...
1 vote
0 answers
2k 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 ...
0 votes
1 answer
610 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 ...