Browse Source

style and rlimit

main
Sergio Álvarez 2 months ago
parent
commit
ee7b861ba8
  1. 2
      README.md
  2. 2
      app/public/css/custom.css
  3. 6
      app/public/index.php
  4. 5
      docker/nginx/default.conf

2
README.md

@ -1,5 +1,5 @@
Simpler than the mechanism of a spoon.
Local testing: `php -S localhost:8000`
Local testing: `php -S localhost:8000 -t app/public`
Docker run: `docker-compose up`

2
app/public/css/custom.css

@ -15,7 +15,7 @@ footer {
}
textarea {
height: 88vh;
height: 93vh;
font-family: monospace;
}

6
app/public/index.php

@ -150,16 +150,14 @@ if ($plain) {
<?php } ?>
<a href="/" role="button" class="secondary">Reset</a>
<a href="<?=$help?>" role="button" class="secondary">Help</a>
<hr />
<p><small>Contact me via <a href="mailto:correo@sergio.am">email</a> or <a href="https://twitter.com/xergio">twitter</a>. Made with pure <a href="https://php.net/">PHP</a> and <a href="https://picocss.com/"><strong>Pico</strong>.css</a>. <a href="https://sergio.am/code/dencode.xrg.es">Source code</a>.</small></p>
</div>
<div>
<textarea name="str" class="form-input" placeholder="Paste a string here"><?=htmlentities($result, ENT_QUOTES | ENT_HTML5 | ENT_IGNORE)?></textarea>
</div>
</main>
<footer>
<small>Contact me via <a href="mailto:correo@sergio.am">email</a> or <a href="https://twitter.com/xergio">twitter</a>. Made with pure <a href="https://php.net/">PHP</a> and <a href="https://picocss.com/"><strong>Pico</strong>.css</a>. <a href="https://sergio.am/code/dencode.xrg.es">Code</a>.</small>
</footer>
</form>
</body>
</html>

5
docker/nginx/default.conf

@ -1,3 +1,6 @@
limit_req_zone $binary_remote_addr zone=rlimit:10m rate=5r/s;
server {
index index.html index.php;
#server_name phpfpm.local;
@ -5,6 +8,8 @@ server {
access_log /var/log/nginx/access.log;
root /var/www/html/public;
limit_req zone=rlimit;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;

Loading…
Cancel
Save