path correction
This commit is contained in:
Vendored
+8
-11
@@ -1,25 +1,22 @@
|
||||
# Deployed under /citpl_website/ on Apache.
|
||||
# Requires: mod_rewrite, mod_headers, PHP curl
|
||||
# API: PHP proxy to Node on 127.0.0.1:3001 (start with: npm run server / pm2)
|
||||
# Deployed under /citpl_website/ — Apache must proxy API to the Node server.
|
||||
# Requires: mod_rewrite, mod_proxy, mod_proxy_http, mod_headers
|
||||
# Start Node on the host: npm run server (or pm2 start server/index.js)
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteBase /citpl_website/
|
||||
|
||||
# API -> PHP proxy (works without mod_proxy)
|
||||
RewriteRule ^api(?:/.*)?$ api/index.php [QSA,L]
|
||||
|
||||
# Uploads -> PHP proxy
|
||||
RewriteRule ^uploads/(.*)$ uploads-proxy.php?file=$1 [QSA,L]
|
||||
# Proxy API + uploads to Express (Node) on port 3001
|
||||
RewriteRule ^api/(.*)$ http://127.0.0.1:3001/api/$1 [P,L]
|
||||
RewriteRule ^uploads/(.*)$ http://127.0.0.1:3001/uploads/$1 [P,L]
|
||||
</IfModule>
|
||||
|
||||
# Host security headers use frame-ancestors 'none' + X-Frame-Options DENY.
|
||||
# Edit them so admin can embed preview.html (same origin).
|
||||
# Allow admin login preview iframe (same origin)
|
||||
<IfModule mod_headers.c>
|
||||
Header always edit Content-Security-Policy "frame-ancestors 'none'" "frame-ancestors 'self'"
|
||||
Header always edit X-Frame-Options "DENY" "SAMEORIGIN"
|
||||
|
||||
<FilesMatch "^(preview\.html|preview\.php|index\.html)$">
|
||||
<FilesMatch "^(preview\.html|index\.html)$">
|
||||
Header unset X-Frame-Options
|
||||
Header always unset X-Frame-Options
|
||||
Header unset Content-Security-Policy
|
||||
|
||||
Reference in New Issue
Block a user