This repository has been archived by the owner on Sep 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from att/messageSize/US133167/nginx_support_po…
…st_requests Message size/us133167/nginx support post requests
- Loading branch information
Showing
6 changed files
with
102 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM openquantumsafe/nginx:latest | ||
|
||
ADD nginx.conf /opt/nginx/nginx-conf/nginx.conf | ||
ADD app.js app.js | ||
ADD start.sh start.sh | ||
|
||
USER root | ||
|
||
RUN apk add --update nodejs npm | ||
RUN npm install express | ||
RUN chmod +x start.sh | ||
|
||
USER oqs | ||
|
||
|
||
|
||
CMD ["./start.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const express = require('express'); | ||
const app = express(); | ||
app.use(express.json()); | ||
app.use(express.urlencoded({ extended: true })); | ||
app.get('/', function (req, res) { | ||
res.send('Received POST request.\n'); | ||
}); | ||
app.post('/', function (req, res) { | ||
res.send('Received GET request.'); | ||
}); | ||
app.listen(3000, function () { | ||
console.log('app listening on port 3000'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
worker_processes auto; | ||
|
||
|
||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
|
||
http { | ||
include ../conf/mime.types; | ||
default_type application/octet-stream; | ||
|
||
|
||
sendfile on; | ||
|
||
keepalive_timeout 65; | ||
|
||
|
||
server { | ||
listen 8080; | ||
server_name localhost; | ||
|
||
|
||
location / { | ||
root html; | ||
index index.html index.htm; | ||
} | ||
|
||
|
||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root html; | ||
} | ||
|
||
} | ||
|
||
|
||
# HTTPS server | ||
# | ||
server { | ||
listen 0.0.0.0:4433 ssl; | ||
|
||
access_log /opt/nginx/logs/access.log; | ||
error_log /opt/nginx/logs/error.log; | ||
|
||
ssl_certificate /opt/nginx/pki/server.crt; | ||
ssl_certificate_key /opt/nginx/pki/server.key; | ||
|
||
ssl_session_cache shared:SSL:1m; | ||
ssl_session_timeout 5m; | ||
|
||
ssl_protocols TLSv1.3; | ||
# You could select a subset of supported KEMs from https://github.com/open-quantum-safe/liboqs#supported-algorithms | ||
# Example (longer strings not supported by nginx!): | ||
# ssl_ecdh_curve oqs_kem_default:frodo976shake:frodo1344shake:p256_kyber512:kyber768:kyber1024:ntru_hps2048509:ntru_hps2048677:ntru_hrss701:lightsaber:saber:kyber512:X25519; | ||
|
||
# location / { | ||
# root html; | ||
# index index.html index.htm; | ||
# } | ||
|
||
location / { | ||
proxy_pass http://localhost:3000; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
node app.js & | ||
nginx -c /opt/nginx/nginx-conf/nginx.conf -g 'daemon off;' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
replicaCount: 1 | ||
image: | ||
repository: qujata/nginx | ||
tag: "1.1.0" | ||
tag: "1.2.0" | ||
pullPolicy: Always | ||
|
||
|
||
|