This file contains hidden or 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
# Protect all files within the uploads folder | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
#RewriteCond %{HTTP_COOKIE} !.*wordpress_logged_in.*$ [NC] | |
#RewriteCond %{REQUEST_URI} ^(.*?/?)wp-content/uploads/sites/[0-9]+/user_uploads|answers/.* [NC] | |
#RewriteRule . http://%{HTTP_HOST}%1/wp-login.php?redirect_to=%{REQUEST_URI} [L,QSA] | |
RewriteCond %{REQUEST_FILENAME} -f | |
# RewriteRule needs the path of folder that we have our files. As an example the folder is on uploads folder on wp and named cv_uploads | |
RewriteRule "^wp-content/uploads/cv_uploads/(.*)$" singledl-file.php?file=$1 [QSA,L] | |
</IfModule> |
This file contains hidden or 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
export async function apiCall(body, method, url) { | |
let headers = new Headers(); | |
headers.append("Content-Type", "application/json"); | |
const requestOptions = { | |
method: method, | |
headers: headers, | |
body: JSON.stringify(body), | |
redirect: "follow", | |
}; | |
try { |
NewerOlder