Questions tagged [static-files]

Static-files are ones that don't get amended during runtime. This could be a HTML file that's served up by a web server.

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

Awaiting on multiple API calls using javascript fetch API does not work as intended in FireFox

I am currently trying to dynamically request a .js file from my backend server eg "address:port/javascriptFile.js" this is in order to perform some basic lazy loading while waiting on ...
Matthew Dickson's user avatar
0 votes
1 answer
28 views

How to handle the path to static files for local development and release in .NET Core web API

I have a mailService that uses static .html files as email templates for sending emails. My current directory structure looks like this: Infrastructure (project name) Templates contact....
Jnr's user avatar
  • 1,504
1 vote
0 answers
21 views

Load static files using nginx for .net core app

I use Angular + .NET Core application and decided to get rid of IIS as a reverse proxy server. In the first step I decide to run nginx locally. I have app1 and app2. By default nginx run app1 and if ...
Ilya's user avatar
  • 25
0 votes
0 answers
6 views

Nginx static files caching get 404

I have multiple location blocks in nginx.conf with most of them direct to containers e.g. grafana, prometheus. location / { alias /opt/myapp-ui/; try_files $uri$args $uri$args/ $...
Kamil's user avatar
  • 1
1 vote
0 answers
20 views

The 'Access-Control-Allow-Origin' header that is not equal to the supplied origin when swiching between 2 domains access same static files

in the context, I've an application that can access via 2 different URL like below backoffice.* backoffice-mfe.* Everything will be fine if I stick and use only one domain in whole time, but the ...
Thu Vo's user avatar
  • 53
1 vote
1 answer
45 views

Django giving error when trying to get path to static file

I'm trying to implement xhtml2pdf, and in my html file, it references a static file. I have the file in my project at jobs/static/jobs/style.css. When using the code xhtml2pdf provides in their docs,...
PoDuck's user avatar
  • 1,391
0 votes
0 answers
16 views

serve static files in Yesod

I'm using Yesod scaffold to build a website, and hope to serve static files from a separate domain. I followed the instruction here to add the following code in the instance of Yesod App ...
C. Ding's user avatar
  • 119
0 votes
0 answers
7 views

Managing file specific access permissions for static resources in springboot with spring security

I have sensitive models that I want to serve to a web client. I was wondering if I could have file-specific user access permissions setup with spring. I know I could just set resources to be ...
Blaine's user avatar
  • 576
0 votes
0 answers
21 views

CSS stylesheet causing syntax errors in node.js application

I'm trying to load a css file into my node.js application however it causes syntax errors in my application. here is my css file called "style.css" under an assets folder .like__btn { ...
Beginner_coder's user avatar
2 votes
0 answers
107 views

In Yew, how is it possible to locate index.html in a static/ directory?

I have something going wrong with my Yew App. I try to locate index.html inside the static/ and, I have this in my Trunk.toml file: [build] target = "./static/index.html" And ultimately, my ...
DrShahinstein's user avatar
0 votes
1 answer
85 views

Nginx mime types errors. How can I set them inside a docker container?

I have the following docker-compose.yml: version: "1.0" services: web: container_name: webserver image: nginx volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro - ./...
Parker's user avatar
  • 351
1 vote
1 answer
38 views

Invoke function before express static middleware

I have a express static middleware to serve file under a specific folder, and i want to run a function before this middleware. I tired something like this: app.use('/projects', ProjectsRoute.addView, ...
Leandro Melo's user avatar
0 votes
0 answers
68 views

Server static files from different machine with docker containers and nginx as reverse proxy

I have a two machines. First machine runs several docker containers (django(uwsgi), db and nginx). Second server runs also several docker containers ( django(dahpne), redis, db ). On first machine ...
Michal P.'s user avatar
0 votes
2 answers
129 views

NodeJS: ENOENT: no such file or directory, stat 'C:\Users\Ido\Desktop\SemestrialNodeJS\public\login.html'

enter image description hereI'm working on a NodeJS project, and I'm experiencing an error when trying to access the login page. When I attempt to navigate to /login, I get the following error message:...
Ido's user avatar
  • 3
0 votes
0 answers
41 views

How to read all files that are hosted by a file server

Desription I am using FileServerOptions to host some files. The EnableDirectoryBrowsing option is enabled so I can view the files through a browser. I would like to get a list of all the files within ...
Tyler's user avatar
  • 89
0 votes
1 answer
81 views

Which docker image to use for static image storage?

I'm developing a full stack application, using Angular, NestJS and docker. The PostgreSQL database and NestJS backend are running in docker containers, using docker-compose. The application must allow ...
user3788133's user avatar
0 votes
1 answer
103 views

Serving uncommon static files, such as .properties, in ASP.NET Core

I'm using Pdf.js viewer in a Blazor Server application, but the middleware is having a hard time serving .properties file needed by the viewer so I added a second middleware as so: app.UseStaticFiles()...
AtomicallyBeyond's user avatar
0 votes
0 answers
117 views

Using a Service Worker in Vue3 SPA to manage an access to API's static files

All internal requests from my web SPA (Vue3) to my RestAPI (Django Rest Framework) are generated by using HTTP Header Authorization: Bearer <access-token>. There access-token is the token from ...
Max Dubrovin's user avatar
0 votes
1 answer
61 views

How to configuring Apache as a Reverse Proxy for a Django App in a Docker Container: Serving Static Files

I have Django app that runs in docker container. I have a problem with serving static files with my Apache configuration. My django app works inside docker container and Apache correctly routes ...
Przemek's user avatar
  • 647
0 votes
0 answers
128 views

Can manifest.json be used to remap website asset paths, so that static assets can utilize content-hash's?

I'm having trouble utilizing a [contenthash] for static assets and remapping the asset path with a manifest.json file. In my project, using Webpack v5 and React, I have a lot of image files in the '...
SS87's user avatar
  • 11
0 votes
0 answers
22 views

Serve Index Page for Public Directory in CKAN

In a custom CKAN extension (https://github.com/berlinonline/ckanext-berlin_dataset_schema), I serve some static files with documentation. The folder with the static files is included in the extension ...
Knud Möller's user avatar
0 votes
0 answers
64 views

Add Spring Boot static file serving path based upon active profile

I have a Spring Boot application using spring-boot-starter-web. How can I serve static content from a local directory outside the src/ hierarchy, but only if a certain profile is active? For example, ...
Garret Wilson's user avatar
0 votes
1 answer
317 views

Vercel not following/finding folder structure when serving static website

I have a static html website that I am deploying using vercel. link can be found here. However, there are some pages that return 404 yet the directory and index files are present. Here is my folder ...
Newton Karanu's user avatar
0 votes
1 answer
41 views

Docker index html file page takes too long to respond

Dockerfile: FROM ubuntu:22.04 RUN apt-get update RUN apt-get install -y nginx COPY -r dist/ /var/www/html/ CMD service nginx start && tail -F /var/log/nginx/error.log Then : docker build -t ...
Fridah W's user avatar
0 votes
1 answer
499 views

How can I serve a React app from Flask backend

I have a frontend app written in React (plain CRA project) that uses a backend written in Python using Flask. I'd like to set up the project in the following way: In production: The backend serves ...
bisgardo's user avatar
  • 4,160
1 vote
1 answer
163 views

Go web endpoint does not find static index.html file

This is my code: package main import ( "fmt" "log" "net/http" ) const customPort = "3001" func main() { fileServer := http.FileServer(http....
yen's user avatar
  • 1,772
0 votes
0 answers
87 views

Serving a JSON file content in Vue.js

I have a JSON file and I want to serve the content inside it when I hit a particular URL in Vue.js, but I do not want to involve any component into that, is there any possible solution for this ? For ...
sarveshsta's user avatar
0 votes
1 answer
64 views

Pycharm virtual environment only displays html of my project, no CSS

I've managed to set up a virtual environment in Pycharm in order to edit my Django app, and the associated website that it interacts with. The interpreter recognizes Django, and I can make edits to my ...
pythonanus's user avatar
0 votes
0 answers
113 views

Unable to get static assets in a rails app: ActionController::RoutingError (No route matches [GET] "/assets/application.css")

I'm not able to get the different assets served in a dockerized rails production environment (RAILS_ENV=production) on my local computer. These files actually do exists in the public/assets/ folder. ...
swiss_knight's user avatar
  • 5,867
0 votes
1 answer
24 views

Cannot access static files from URL in express application

I have built a basic express app as below - index.js const express = require("express"); const app = express(); app.use(express.static(__dirname + "public")); app.get("/&...
Ankit_M's user avatar
  • 278
0 votes
1 answer
188 views

Imported js files inside site.js not loading on frontend (asp.net core mvc)

_Layout.cshmtl <script type="module" src="~/js/site.js" asp-append-version="true" ></script> site.js import NotificationCore from "../lib/core/modules/...
Whanna now's user avatar
0 votes
0 answers
48 views

Relative path in dynamically generated (with hash) folder

With Express, I am trying to acess relative path (css/..., assets/...) inside HTML file. I can't use express.static() because the HTML file is located in a dynamically generated folder, with a hash as ...
Pedro Fernandes's user avatar
0 votes
1 answer
301 views

How do I serve static html files in NGINX?

I'm trying to serve some static html files in NGINX in the following folder and file naming convention. /root/level-1/ /root/level-1a/ /root/level-1b/ /root/level-1.html /root/level-1a.html /root/...
Wasca's user avatar
  • 1
0 votes
0 answers
133 views

static files in springboot project deployed to an external Tomcat with WAR

I'm new to Spring and Springboot, I'm just trying an easy thing I can't sort out: As per the title, I want to put in a project some static files, then package the project with maven as war and deploy ...
Flatline1963's user avatar
0 votes
0 answers
97 views

Reading static files from public folder in play framework in production

I'm trying to make a route to a specific static file. It is working when running in local but when I run it using docker I'm getting an error. The file is present at: public/robots.txt I am accessing ...
Nandha's user avatar
  • 1
1 vote
1 answer
198 views

how to use an External Value (type JSON) in SwaggerUI and NodeJS

openapi: "3.0.0" Swagger-jsdoc: "^6.2.5", Swagger-ui-express: "^4.3.0", Node: v18.8.0 I have a payload with a field called raw_data who is super long. So I decided to use ...
Momo's user avatar
  • 59
1 vote
1 answer
64 views

How to access static file for webserver build via docker

I am having an issue with accessing a static file for my local webserver when I am building it with docker. I am using the github.com/xeipuuv/gojsonschema tool kit for validating incoming json request ...
LupefiascoMosdef's user avatar
0 votes
1 answer
685 views

how to access static files from Another server in .net Core?

I have 2 Web Apps in .Net Core, the first is called 'MiddelwareApp' that is public To the internet and Receive Requests from clients in encrypted Case Then Decrypt them and sends Requests to the ...
Mohamed Elkordy's user avatar
0 votes
1 answer
485 views

How can I serve the same route with fastify/static and a custom route based on header?

Say for example I have a route along the lines of /object/:id, and I want to use fastify/static to serve STATIC_FOLDER/object/<supplied id>/index.html by default. This is really easy, I just ...
death_au's user avatar
  • 1,282
0 votes
0 answers
10 views

The changes in my css files are no longer showing up on my django project

I am kind of new to django so someone please help me out. I'm building a blog app and so far everything's good but the new css rules I've added are not loading on my project. I've set up all my static ...
Emac342007's user avatar
0 votes
0 answers
24 views

Server data transfer from static folder to client

I have a server with a static folder that contains some images for the public to preview. I use Nodejs Express to serve the static folder. I have 1TB data transfer each month. Let's say an image is ...
Bassel Turky's user avatar
1 vote
1 answer
346 views

load html code into gin framework template

I am new to go and [gin framework]https://gin-gonic.com/ I have an HTML file like this example.html <div> <p> text for test <p> <p><img src="https://...
JACK's user avatar
  • 65
0 votes
0 answers
311 views

How do I access static files using Jinja in Django

I am using Jinja templating within Django and I am having trouble getting static files to load. I have tried setting up the back end per this documentation (I've included the code below): https://...
eb123456's user avatar
0 votes
0 answers
217 views

Serving static files with NGINX and DJANGO

I'm new to programming and I've managed to build my father a website where he can showcase his photography, I recently had to switch from shared hosting to my own VPS that uses ubuntu to give me more ...
David Henson's user avatar
0 votes
0 answers
211 views

serve static content with nginx proxypass

I have a python application with a folder of static css and js elements, which I want to serve with nginx. The app works and does the proxypass to localhost:3000 where I have my app running, but it's ...
Miguel Duque's user avatar
0 votes
2 answers
128 views

node express folder access for authorized users

I am trying to allow users to save and download static files. But have the files be accessible only for logged in (authorized) users. routes/files.js var express = require('express'); var router = ...
Caldera500's user avatar
0 votes
2 answers
235 views

express.static files dont load static files

I am trying to server static files with express and them dont work, i think its express problem or something but i dont realize why it dont works. my folders look like this: app.js public --css --js --...
Jaz's user avatar
  • 55
0 votes
1 answer
42 views

Why can't I make changes in my django static files?

A bit of context: I am taking the CS50W course, and now I'm finishing the almost-completed django Mail single-app provided by the distribution code. Within that distribution code, aside from all ...
Cauã's user avatar
  • 31
0 votes
1 answer
565 views

Docker Wordpress Nginx doesn't serve static files

I'm trying to setup my existing wordpress web app using Docker and Nginx + Wordpress:fpm-alpine + Phpmyadmin + Mysql images By following this tutorial, I've changed the docker-compose.yml file to ...
Listoun developer's user avatar
0 votes
0 answers
26 views

Static files not being served on using :slug

When I got to http://localhost:8090/ or http://localhost:8090/about my static files work. But if I visit any of the posts for example http://localhost:8090/posts/lorem-ipsum I get GET error in browser ...
drfvij-0's user avatar

1
2 3 4 5
16