Posts

Showing posts from April, 2026

Preparing your local Postges DB. Resolving timezone headache for developers.

Preparing your local Postges DB  Resolving timezone headache for developers.    To set your PostgreSQL server time to UTC, you can change the setting globally, per database, per user, or for a single session.  Permanent Global Change Modify the main configuration file to set the default for the entire server. Locate the file : Find your  postgresql.conf  file by running this SQL command in your database: SHOW config_file; Edit the file : Open  postgresql.conf  and find the  timezone  parameter. Change it to: text timezone = 'UTC' Use code with caution. Apply changes : Reload the configuration without restarting the server by running: SELECT pg_reload_conf(); (Alternatively, use  pg_ctl reload  from your terminal) .  Permanent Database or User Change If you only want specific databases or users to use UTC, use these SQL commands: Per Database: ALTERDATABASE your_database_name SET timezone TO'UTC'; Per User : ALTER USER your...

Axios returned 403 when i requesting resource which has proper CORS setup - why? (my case)

Image
Axios returned 403 when i requesting resource which has proper CORS setup - why? (my case) I fell for that trick 🤯 - if you too, look into your infrastructure for CloudFlare DNS Proxy and rules inside Cloudflare which is blocking you and your Axios returned you 403 because it sees access denied from Cloudflare, not from your company resource you are trying to make request to and which is properly available for you by CORS (permissions). Happy coding, guys! 🤗